home *** CD-ROM | disk | FTP | other *** search
Text File | 1995-06-25 | 174.6 KB | 4,391 lines |
- • 160k ADFS discs for the Archimedes? If you have upgraded to the
- Archimedes from a Master, or even a Beeb with ADFS, you might have some
- 5.25“ discs you want to transfer. According to the manuals, the
- Archimedes will only read and write to 640k (L) format, Arthur 800k (D)
- format, or the RISC-OS 800k (E) format using either 3.5” or 5.25“ discs
- (80T). However, the Master could read and write 40T 160k (S) format,
- 80T 320k (M) format, or 80T 640k (L) format discs. I discovered by
- accident that the Archimedes will quite happily read 5.25” 160k (S)
- discs in 40T mode, and in fact save them − I have not been able to try
- out 320k discs since I do not have any. You cannot, however, format
- discs at either 160k or 320k on the Archimedes but then why would you
- want to anyway? Chris Hughes (Wakefield BBC Micro User Group).
- 4.01
- • Apocalypse Tips − Progressing from planet to planet is really simple.
- At the start of the game, a map of your selected planet is displayed.
- All the objects on the planet’s surface are represented by coloured
- dots, about 80% of which must be destroyed for your craft to be
- withdrawn and for you to be allocated another planet.
- 4.01
- As you progress through the game and return to the ‘Guild of Spacings’
- you will be given various add-ons for your ship. These include a super-
- cooler for your laser-canon and better shielding. It is vital that you
- have these if you intend to progress at a reasonable pace, so it is
- advisable to get them as soon as possible. Remember, you can only
- return a maximum of five times before being rejected by the Guild. When
- you have destroyed your 80% or so, you will automatically be withdrawn
- by the Guild − this may take some time so don’t give up too quickly!
- 4.01
- If you prefer rather more action and less running away, the following
- lines of the BASIC file ‘!Apocalyps.Apocalypse’ can be changed.
- 4.01
- Line 290 is your starting score.
- 4.01
- Replace line 330 with: 330 !shieldcharge=16 :
- !rapidturnF=1:!guntempcooler=0
- 4.01
- Now delete lines 340 to 380 inclusive for all the extra features and
- (very) strong shields.
- 4.01
- Replace line 770 with: UNTIL 0 for infinite lives. At line 1970
- !impcounter is the number of objects you have shot, which determines how
- many you have to go before advancing to the next planet. For instant
- withdrawal, replace 1970 with: 1970 !impcounter=10000.
- 4.01
- Line 6910 is how many times you can return to the guild before rejection
- (this is normally 5).
- 4.01
- • HFORM v1.72 bug or feature? If you try to format an ST506 hard disc
- that has had a different profile (e.g. it was used on a PC beforehand)
- with the Acorn HFORM program supplied on the RISC-OS Supplement Disc,
- the new disc shape option will not be acknowledged and so the full
- capacity of the drive may not be realised. This can be overcome by
- removing the line that reads:
- 4.01
- 2130 IF cyl%=0 IF head%=0 IF Formatted% GOTO 2180
- 4.01
- Brian Oliver.
- 4.01
- • Hostages cheat mode − If you hold down the <R>, <U>, <T> and <H> keys
- once the title screen has loaded and press <return>, you will enter into
- the cheat mode. This allows you to jump to either section two or three
- of the game with three hostages and seven terrorists.
- 4.01
- • RAM discs for the PC Emulator − It is possible to create a hard disc
- partition in any filing system. For example, by altering the !PC.!Run2
- file so that the path for Drive D is ‘RAM:$.RamDisc’ and using the FDISK
- program to create a RAMFS hard disc partition, you can obtain any size
- RAM disc you require _ memory and pages sizes permitting. Michael Ben-
- Gershon.
- 4.01
- • Reading a system variable from BASIC − The question was, “I’ve got a
- system variable being set in the !Run obey file:
- 4.01
- Set MaxNumberOfFonts 32
- 4.01
- and I want to be able to read this value into a BASIC variable but when
- I use:
- 4.01
- value% = VAL (“<MaxNumberOfFonts>”)
- 4.01
- it produces the error ‘Variable not found’, because it takes the ‘<’
- character as meaning ‘less than’ rather than ‘start of system variable’.
- Using the BASIC keyword EVAL has the same effect.
- 4.01
- The first thing we need to do is to extract the value of the system
- variable into a string that we can manipulate. After searching through
- the PRM volume II, I eventually found OS_ReadVarVal (SWI&23) on page
- 750. On entry, R0 points to the name of the system variable to be read,
- R1 points to a suitable buffer to store the string in, R2 is the maximum
- length of this buffer, R3 is set to 0 to use the first occurance of the
- named system variable, and R4 is set to 3 so that an expanded string is
- returned in the buffer.
- 4.01
- On exit, we should now have the value of the system variable in the form
- of a string. The next task is to convert this string into an integer,
- and this is easily performed by using OS_ReadUnsigned (SWI &21) on page
- 585. On entry, R0 is set to 0 so that the base number used is assumed
- to be 10 unless the string indicates otherwise, R1 is the pointer to the
- string (note that this is the same as R1 for OS_ReadVarVal, which is
- preserved on exit). On exit R2 contains the value of the system
- variable as an integer, using only two SWI calls.
- 4.01
- This is easily implemented in both BASIC and ARM assembler.
- 4.01
- In BASIC this can be achieved with 4 instructions:
- 4.01
- MaxBufferLength = 16
- 4.01
- DIM BufferPtr MaxBufferLength
- 4.01
- SYS “OS_ReadVarVal”, “MaxNumberOfFonts”, BufferPtr,
- MaxBufferLength,0,3
- 4.01
- SYS “OS_ReadUnsigned”,0,BufferPtr TO ,,value%
- 4.01
- and if you want to do in Arm assembler, then only eight instructions are
- necessary:
- 4.01
- ...
- 4.01
- ADR R0, SystemVariablePtr ; point to system variable
- 4.01
- ADR R1, BufferPtr; point to buffer
- 4.01
- MOV R2, #MaxBufferLength ; length of buffer
- 4.01
- MOV R3, #0 ; use first one found
- 4.01
- MOV R4, #3 ; expand fully
- 4.01
- SWI XOS_ReadVarVal ; R1 preserved
- 4.01
- MOV R0, #0 ; use default base
- 4.01
- SWI XOS_ReadUnsigned ; R2 = value%
- 4.01
- SystemVariablePTr = “MaxNumberOfFonts”, 0 ; note no ‘<’ or ‘>’ are
- used
- 4.01
- ALIGN
- 4.01
- MaxBufferLength * 16
- 4.01
- BufferPtr % MaxBufferLength ; reserve MaxBufferLength
- 4.01
- ALIGN ; bytes of workspace
- 4.01
- To give a quick example of its use. ‘SetMaxNumberOfFonts 16’ gives
- value% = 16. ‘SetMaxNumberOfFonts &20 gives value% = 32.
- 4.01
- This may be of use to programmers, as it allows constants to be set up
- in the !Run obey file and users can modify them to fit their require
- ments, without having to modify the program itself. John ‘Lofty’
- Wallace.
- 4.01
- • System Variables for the Filer Module (Archive 3.11 p7) − The problem
- with the Filer module not allowing you to include system variables can
- be solved a lot easier (and without taking up any valuable RMA space).
- 4.01
- I like to use icons for the directories which contain the third party
- applications, demos, utilities, etc. This meant using an application
- directory and I wanted a general purpose !Run obey file to open the
- directory viewer (using Filer_OpenDir). However, I came across the same
- problem as Simon Callan. The solution I present here was passed on to
- me by Paul Fellows (who wrote ‘Archimedes Basic Compiler’ amongst other
- things) and so I don’t wish to take the credit for such a neat idea.
- 4.01
- So that I don’t have the !Run, !Sprites, etc with the actual programs I
- want to view, I create a directory ‘_’ inside that application directory
- to hold them. Thus my !Run obey file reads as follows:
- 4.01
- |!Run obey file
- 4.01
- |
- 4.01
- IconSprites <Obey$Dir>.!Sprites
- 4.01
- Set Alias$OpenDir Filer_OpenDir <Obey$Dir>._
- 4.01
- OpenDir
- 4.01
- Setting a command string as an ‘Alias’ will expand any system variables
- within that command string. This gets around the problem which Simon
- describes, and also means that you don’t need to run a program every
- time you switch the machine on. John ‘Lofty’ Wallace.
- 4.01
-
- • 160k ADFS Discs (continued from Archive 4.1 p9) − It is certainly true
- that the Archimedes can be made to read and write 160k or 320k ADFS
- discs correctly. I think, however, that the Archimedes ‘sees’ these as
- 640k L format discs and if a read or write operation directs it to a
- track beyond 39 (160k) it will try to push the disc head off the edge of
- the disc searching for tracks that aren’t there. Fine if you know what
- you’re doing. Lorcan Mongey.
- 4.02
- • Am I in the desktop? You can use the Wimp_ReadSysInfo SWI command to
- see if your program is running in the desktop or not. The command
- returns the number of active tasks, which will be zero if the program is
- running outside of the desktop environment. The example program below
- will sense whether it has been run from the desktop environment and if
- not, it will start up the desktop before running another application (in
- this case !Edit).
- 4.02
- program segment missing
- 4.02
- Adrian Look.
- 4.02
- • Apocalypse hints & tips − If you shoot the green T-shaped buildings
- with a triangular roof using a mega photon your shield will be replen
- ished. If you shoot a purple and green mushroom, your shield will go
- into override but your points are decreased for anything you hit with
- the photons you are allocated. If you shoot a rectangular brown
- building they leave a shallow pyramid and if you shoot this, a Rakon
- Gomjabba will appear and you will get a few more points for destroying
- this. If you shoot a Snail Rider with a mega photon, your energy banks
- are recharged. If you shoot a green mushroom, your score will decrease
- for everything you hit with the mega photons allocated.
- 4.02
- If you type in and run the following program with disc two in drive 0
- you will then be able to access all of Apocalypse’s nine worlds.
- 4.02
- program segment missing
- 4.02
- Paul Bedford.
- 4.02
- • Bug in the Debugger Module − Some of you may be aware of a problem
- with the Debugger module failing to disassemble certain instructions
- correctly if they contain an immediate constant. An immediate constant
- is stored as an eight-bit value with a 4-bit shift applied, and the
- debugger normally expands this format to its correct value, but
- occasionally fails, e.g.
- 4.02
- E28F0C01 ADD R0,PC, #&0100 correctly expanded
- 4.02
- E28F0D01 ADD R0,PC, #&01,26 failed to expand (should be #&40)
- 4.02
- I have disassembled the debugger module and found the offending piece of
- code. It doesn’t seem to be a bug, rather a deliberate move to expand
- constants differently under certain circumstances but for no obvious
- reason. Anyway, the fix is to change the word at offset &920 in the
- module from &1A000028 to &FA000028, effectively changing a BNE to a BNV.
- This seems to solve the problem, although I haven’t tested this fix
- exhaustively, so proceed with caution. Lorcan Mongey.
- 4.02
- • BUILDing !Run files − If you write a !Run file using *BUILD and want
- to include a line such as:
- 4.02
- Run <Obey$Dir> .!RunImage
- 4.02
- then, instead, you should type:
- 4.02
- Run |<Obey$Dir>.!RunImage
- 4.02
- to prevent RISC-OS from inserting the value of Obey$Dir into the file.
- It may be obvious but until now I have been using !Edit to write a two
- line Obey file! Elliott Hughes.
- 4.02
- • Copy Options − “Confirm” and “Verbose” − I think this is probably one
- of those hints which would be classed as “obvious” by those who know it:
- The Archimedes User Guide and the PRM both describe, at some length, the
- use of the system variable Copy$Options which sets default options for
- the *Copy command. However, neither make if clear that the desktop
- filer has its own “Confirm” and “Verbose” options which are quite
- independent of those which are stored in the system variable. Thus no
- amount of modification of Copy$Options in boot files or elsewhere will
- affect the way the desktop behaves.
- 4.02
- The filer options can be read and changed by clicking the menu button
- over any directory window and choosing the Options option. The options
- selected by this route differ in one significant way from the
- Copy$Options in that they are stored in battery-backed RAM and thus are
- preserved when the machine is switched off or reset. They are stored in
- byte 198 of the CMOS RAM (not byte 195 as my copy of the PRM says) along
- with various other desktop options:
- 4.02
- program segment missing
- 4.02
- Having these options stored in CMOS RAM can sometimes be an advantage
- but on the whole I find it rather inconvenient. For instance, I often
- change temporarily from an icon display to “Full Info” and would like
- icons to be restored after a reset. Luckily this sort of preference can
- easily be dealt with by a few lines in the boot routine. For instance,
- the following lines of BASIC will reset the Display mode to small icons
- while preserving the other options:
- 4.02
- program segment missing
- 4.02
- Hugh Eagle.
- 4.02
- • Cut and paste clip board − Many RISC-OS applications have a ‘cut and
- paste’ option. If these applications can also edit more than one
- document at a time then you can use the ‘cut and paste’ option as a clip
- board to transfer data from one document to another. For example, you
- can select a block of text in one !Edit document, move to another
- document and then use the <ctrl><c> option to copy the block into that
- document. This method will also work with applications such as
- PipeDream but not Ovation or Impression, etc as they use the ‘clip
- board’ method. Steve Drain.
- 4.02
- • Deskjet Plus Ink Cartridges, Recharging − You may have discovered the
- same problem as me when trying to recharge these cartridges, namely that
- the ink won’t go in the hole!
- 4.02
- A bit of reverse engineering, with the aid of a hacksaw, has revealed
- the cause. The container is filled with a dense spongy material which
- holds the ink, but this does not enter the cavity formed by the raised
- green portion with the central vent hole. If a syringe needle is
- entered through this hole it must be long enough to reach into the
- sponge. At least 20mm is required. If this is not the case then the
- inserted ink charge is held on top of the sponge by surface tension, and
- quickly overflows through the charge hole.
- 4.02
- The only syringes which I can get hold of are intended for diabetics and
- have a needle which is too short to reach the sponge through the top
- hole. The solution is to fill the sponge through the top hole. The
- solution is to fill through a second hole, drilled as small as possible,
- on the 3mm wide land to the side of the raised portion. In this
- location there is a small internal cavity not filled with sponge. This
- prevents capillary leakage after recharging.
- 4.02
- Archive readers may be interested in the following program which will
- draw a sketch showing the location of the hole. It should be made as
- close to the vertical wall of the raised portion as is possible.
- 4.02
- program segment missing
- 4.02
- With regard to inks I have excellent results with Rotring Art Pen Ink
- which comes in many colours. Bill Graham.
- 4.02
- • MEMC DMA control register − With reference to Sean Kelly’s tip in June
- ‘90 for gaining extra speed from the Archimedes by disabling the VIDC’s
- DMA access. Although the technique normally works without any trouble,
- occasionally the machine crashes or has its memory contents corrupted.
- As Sean correctly stated, bit 10 of the MEMC register controls VIDC DMA,
- however, as the dynamic RAM (DRAM) in the machine is no longer being
- read by the VIDC it is also no longer being refreshed properly. Bits 8
- & 9 of the MEMC come to the rescue, they are the DRAM refresh control
- bits.
- 4.02
- There are three available modes of refresh:-
- 4.02
- bit 8 bit 9
- 4.02
- a) no refresh 1 0
- 4.02
- (not used by the Archimedes)
- 4.02
- b) refresh during video flyback 0 1
- 4.02
- c) continuous refresh 1 1
- 4.02
- Flyback time during standard modes (0-16 & 24) is greater than the DRAM
- holding time and as such requires refresh during flyback. In multi-sync
- modes the flyback time is much faster and the memory does not need to be
- refreshed by the MEMC.
- 4.02
- The codes for the various modes are:-SYS“OS_UpdateMEMC‘,768,1792 to turn
- off the VIDC DMA and invoke continuous refresh and
- SYS“OS_UpdateMEMC‘,1536,1792 to return to normal for standard modes.
- 4.02
- It should be pointed out that the continuous refresh mode uses the DMA
- video pointer as the refresh address source, incrementing the pointer
- after use. As such this should be used with care if the pointer is used
- as an active part of your program whilst the screen is blanked. (But
- why would you want to move the pointer if you can’t see it??)
- 4.02
- There is also a sound DMA control bit in the MEMC but as this does not
- affect memory refresh bits 8 and 9 which do not need to be altered.
- 4.02
- Bit 11 − 0 Sound DMA disable
- 4.02
- 1 Sound DMA enable
- 4.02
- Rob Swain.
- 4.02
- • Modifying the RISC-OS dot matrix printer driver − To add a new dot
- matrix printer configuration to the RISC-OS printer driver you will need
- to alter the ‘PrData’ file in the ‘!PrinterDM’ directory (on you
- Applications Disc One or RISC-OS Extras Disc = Shareware 17):
- 4.02
- 1) Make sure you have made a back up copy
- 4.02
- 2) Run the !Edit program on Applications Disc One
- 4.02
- 3) Double click on the copy of !PrinterDM that you wish to alter,
- whilst holding the <shift> key down − a filer window will then open with
- the contents of the !PrinterDM application inside
- 4.02
- 4) Double click on the ‘PrData’ file in the !PrinterDM filer window − a
- text window will then open
- 4.02
- 5) Use the arrow keys to position the caret (red vertical text cursor)
- just before the ‘Configured options’ heading and after the row of full
- stops
- 4.02
- 6) Add the following text changing the information to match your
- printer (the example below adds a Shinwa CP80/Lucas LX80 option to the
- RISC-OS printer driver):
- 4.02
- program segment missing
- 4.02
- Alan Dawes
- 4.02
- • Nevryon hints & tips − Nevryon passwords for level three, five and
- seven are given at the foot of this column, the letters being reversed
- for the benefit of those who prefer to ignore them.
- 4.02
- The following Nevryon cheat allows the ship to be upgraded to have any
- weapons desired and energy/credits/lives may also be altered.
- 4.02
- Load the ‘!Nevryon.Multi’ file on the Nevryon disc 1 and insert the
- following at line 211.
- 4.02
- 211 Dump=PAGE-&3F800:Dump?n=value
- 4.02
- where n is:
- 4.02
- n=27: Ship speed, 4 recommended
- 4.02
- n=28: Shield orb (top), 1=ON 0=Off
- 4.02
- n=29: Shield orb (bottom), 1=ON 0=OFF
- 4.02
- n=30: RAM, 1=ON, 0=OFF
- 4.02
- n=32: Gun droids, 0-2
- 4.02
- n=33 Lasers, 0-2
- 4.02
- n=35: Number of credits (default 3)
- 4.02
- n=36: Number of lives (default 4)
- 4.02
- n=37: Starting secondary weapons status, 0=Off, 1=flamer, etc
- 4.02
- n=38: Gold bar status, 0=OFF, 1=flamer, 2=mines, etc
- 4.02
- n=43: Amount of energy (default 12)
- 4.02
- Change as many of these values as you want and save altered program and
- repeat the process for the $.Multi file on the Nevryon 2 disc. Jeremy
- Mears.
- 4.02
- upside down words missing!
- 4.02
- • Printing a full path name − This is a reply to the cry of help in
- February 1990 from Richard Skemp about how to get the printer driver to
- include the full pathname. If you add the following line to the Library
- program in the !PrinterDM directory, the printer driver will print the
- full file pathname of any text file you print.
- 4.02
- 3281 BPUT#outfile%, CHR$13+CHR$10 +“Printing file ”+filenam$
- +CHR$13+CHR10+CHR$10
- 4.02
- Lorcan Mongey.
- 4.02
- • Reinstating the filer module − An item on system variables mentions
- that if you *RMFaster the filer module from the desktop, you lose the
- filer icons and can’t get them back (Archive 3.11 p7). To retrieve
- them, try:
- 4.02
- <F12>
- 4.02
- Desktop
- 4.02
- <Return>
- 4.02
- this doesn’t interfere with anything already in the desktop but re-
- starts any of the default tasks that have been lost, namely Filer,
- PaletteUtil an TaskManager. Note, however, that if you *RMKill or
- *RMFaster the Task Manager, you can’t get a *prompt by pressing F12! To
- get around this, make up an Obey file containing the command
- 4.02
- *Desktop
- 4.02
- and this will do the trick. It’s quite interesting to see the Task and
- Palette icons in the “wrong” place on the icon bar! However, I feel
- that you should not deliberately interfere with desktop modules and this
- method should really be regarded as a ‘get-you-home’ technique in case
- of problems. Lorcan Mongey.
- 4.02
- •REMming your programs − When writing a program, in any language, it is
- good practice to put plenty of comments in to remind oneself what each
- particular section of code does. However, in BASIC, there are two
- things which tend to deter one from following this practice. The first
- is that the interpreter has to recognise a REM statement before it knows
- to ignore it. This takes time, which may be undesirable in procedures
- and loops. The second deterrent is the amount of space taken by the
- text of the comment, which is stored verbatim in the program.
- 4.02
- I have a practice, when commenting procedures and functions, of placing
- explanatory comments outside the procedure/function block. For
- instance:
- 4.02
- program segment missing
- 4.02
- Clearly, the above practice prevents the REM statements from impacting
- the performance of the procedure/function, as they are in section of the
- code which the interpreter will never see.
- 4.02
- This last observation leads to an additional possibility for interpreted
- code (but not for compiled BASIC). Since the interpreter never sees
- these lines between procedure/function blocks, the normal syntax rules
- can be broken without an error being generated. Thus, we can save some
- space, as well as execution time, by omitting the REM key words. Note
- that this will only work if the comments are where the interpreter
- cannot see them. If you are in the habit of using GOTO statements
- (sometimes a handy way of removing umpteen layers of IF... THEN... ELSE
- statements if you are checking for exceptions and, despite common
- ‘wisdom’, still used frequently by professional programmers), this
- placing of syntactically incorrect code beyond the bounds of a procedure
- block might allow the trapping of such errors as omitting the ENDPROC or
- = statements. David Hazel.
- 4.02
- • Star LC10 − An undocumented feature on a Star LC10 Colour Printer, is
- that if you open out a file to the printer and try and print characters
- 27 and 102 to it, it prints out the current dip switch setting:
- 4.02
- program segment missing
- 4.02
- Jason Ede.
- 4.02
- • System Variables (continued from 4.1 p9 & 4.1 p10) − I had had similar
- problems and came up with a different solution which can solve both
- problems, i.e. reading system variables to BASIC and passing system
- variables to the Filer module. I use a call to OS_EvaluateExpression,
- which can return a numeric or string value, as follows:
- 4.02
- program segment missing
- 4.02
- This is an artificial example; in practice you would know whether you
- were expecting a numeric value or a string, such as Obey$Dir. Lorcan
- Mongey.
- 4.02
-
- • Basic Text File Type − Acorn have specified field type &FD1 for BASIC
- ASCII text. This is very useful for BASIC programs which are kept in
- !Edit format as it allows the user to define a RunType for them. For
- example, the following command will cause a BASIC text file to be run
- just like a normal BASIC file:
- 4.03
- *Set Alias$@RunType_FD1 Basic-quit |“%0|” %*1
- 4.03
- Jim Markland, Cirencester.
- 4.03
- • Converting old Arthur programs to RISC OS − Before the days of RISC-
- OS, programs running under the old Arthur used a form of reconfigure
- system to adjust the CMOS RAM settings. Now that RISC-OS is available,
- those programs are out of date, and are a pain, as in most cases they
- don’t “Boot-Up” from the desktop.
- 4.03
- RISC-OS uses a different form of reconfiguring. Two in fact − one is
- the WimpSlot command, which tells the computer the minimum and maximum
- amount of memory the program is going to need and the other uses the
- module MemAlloc, found in the !Lander directory on Application disc 2.
- 4.03
- These two things are quite easy to use. The only problem is how to find
- out how much room the program is going to use. This can be discovered
- fairly easily.
- 4.03
- Load up the !Boot file and examine it using the BASIC Editor. What you
- are looking for are a set of commands/variables, which tell the computer
- the amount of SpriteSize/Screensize, etc it is going to need to run. To
- convert this, all you need is the MemAlloc module, and in a run file,
- use MemAlloc to allocate the memory needed for the application.
- 4.03
- Here are some examples:
- 4.03
- Holed Out
- 4.03
- 1. Format a fresh new disc
- 4.03
- 2. Create a new directory called !HoledOut
- 4.03
- 3. Copy all the files on the original Holed Out disc, except the !Boot
- file into the new directory.
- 4.03
- 4. Copy MemAlloc into the !HoledOut directory.
- 4.03
- 5. Use !Edit to create the following Obey file:
- 4.03
- program segment missing
- 4.03
- 6. Load HoledOut 2 into the BASIC Editor and, where the program loads a
- particular file, change it to
- 4.03
- (LoadCommand) <HoledOut$Dir>. (File to be loaded)
- 4.03
- for example
- 4.03
- 70 *RMLOAD BELL
- 4.03
- change to
- 4.03
- 70 *RMLOAD <HoledOut$Dir>.Bell
- 4.03
- and
- 4.03
- 610 CHAIN “HOLEDOUT3”
- 4.03
- change to
- 4.03
- 610 CHAIN “<HoledOut$Dir>.HOLEDOUT3”
- 4.03
- etc, etc.
- 4.03
- 7. Do the same as above to the file HOLEDOUT3, wherever the program
- loads a particular file, put the command<HoledOut$Dir>. in front of the
- filename.
- 4.03
- 8. Create a !Sprite file for the application icon and away you go!
- 4.03
- Then HoledOut should run as a RISC-OS application, and will also run off
- a Hard Drive (N.B. I used Holed Out Extra Courses 1)
- 4.03
- Explanation of !Run File:
- 4.03
- Line 1: Tells the computer to set a directory, and to enter it without
- changing the root directory whenever the <HoledOut$Dir> command is used.
- 4.03
- Line 2: Allocates the minimum and maximum amount of memory needed to
- run the application.
- 4.03
- Line 3: Tells the computer to look for the module MemAlloc in memory,
- if it isn’t found then it tells the computer where to find it and loads
- it.
- 4.03
- Lines 4-9: Tell the computer the memory settings the program needs.
- 4.03
- Line 10: Kills the module MemAlloc for more memory.
- 4.03
- Line 11: Runs the actual program.
- 4.03
- Pacmania:
- 4.03
- In this case, things are a little different. So do the following:
- 4.03
- 1. Format a new disc.
- 4.03
- 2. Create a new directory called !PacMania.
- 4.03
- 3. Copy all the files except !Boot into the new directory.
- 4.03
- 4. Use !Edit to create an Obey file containing the following...
- 4.03
- Set PacMania$Dir <Obey$Dir>
- 4.03
- Run <PacMania$Dir>.!RunLoad
- 4.03
- 5. Use the BASIC Editor to create a file called !RunLoad...
- 4.03
- 10 *Load <PacMania$Dir>.PacMania 10000
- 4.03
- 20 CALL &100000
- 4.03
- 6. Create an application !Sprite file.
- 4.03
- PacMania should then run as a RISC-OS application.
- 4.03
- So there we are, I’ve also used another command to help with the loading
- process. <Obey$Dir> and <(Application name)$Dir>. These two commands
- tell the computer where to find certain files, no matter where they are.
- (Hidden in directories on a hard drive for example.) Duncan Burbidge.
- 4.03
- • Getting Taxan 795 to work with Archimedes. The Taxan 795 is an
- excellent multi-sync colour monitor, but it was a bit unnerving, on
- unpacking and assembling my new A440 with VIDC Enhancer and 795 monitor,
- to be confronted with a screen which just would not synchronize! But,
- with help from Paul and from Atomwide, and with a lot of exploration, I
- think that I now know what screen modes it will support and how to get
- them.
- 4.03
- Initially, the trick is to set *CONFIGURE MONITORTYPE 1 and *CONFIGURE
- WIMPMODE20. Then the machine wakes up in the desktop in mode 20 whether
- or not the VIDC enhancer software (VIDCmodes for the 795) is installed,
- provided that (if it is not installed) the VIDC switch is ‘off’.
- However, if VIDCmodes is not installed, loading an application which
- changes the mode to one of the basic Archimedes modes (0-17) plunges you
- back into an unsynchronized screen. Therefore, my initial explorations
- were done with an ordinary monchrome monitor connected to the sync BNC
- socket, after changing two links on the circuit board − as explained on
- page 434 of the RISC-OS user guide. Options for all Acorn and Atomwide
- modes (except the high-resolution mono mode 23) are listed in the
- accompanying table. (See opposite.) Bill Mapleson.
- 4.03
- • Keywords in BASIC − I have found that PRINT ‘SHIFT F1’ showed a lower
- case underline ‘a’. From BASIC on pressing return to ‘PRINT’ the result
- I found a number that looked just like TIME. It was. SHIFT F2 gives
- HIMEM and SHIFT F3 = LOWMEM. No other Fkey gives a number, but they all
- act as quick entry keys for use in BASIC program writing within ARMB
- edit. They must be programmed with BASIC keyword token values.
- 4.03
- I expect this is widely known but here is the list for completeness.
- 4.03
- program segment missing
- 4.03
- Simon Anthony, Nottingham.
- 4.03
- • Locating screen coordinates − When writing wimp programs (out of
- desktop) it’s often hard to plot things because you’re not sure what the
- coordinates of the screen are. Using the program below, it is possible
- to do this.
- 4.03
- program segment missing
- 4.03
- I hope the program is of some use to wimp programmers. Duncan Burbidge.
- 4.03
- • MSDOS installation on hard disc − Here is a summary of the steps for
- getting an MSDOS partition installed onto a hard disc.
- 4.03
- 1. (This step applies only if you have an old PCEmulator, e.g. V1.20,
- and a V1.33 upgrade disc)
- 4.03
- (a) Read ‘ReadMe2’ on the V1.33 disc.
- 4.03
- (b) Run ‘MakePC’ on the V1.33 disc. (This copies the file !PC.Rom from
- the 1.20 disc to the 1.33 disc. Although the desktop displays this as a
- ‘text’ file, I reckon that in fact it is the emulator itself and that
- all the other files are concerned with preparing the Archimedes to run
- the Emulator.)
- 4.03
- 2. Read ‘ReadMe’ on V1.33 but don’t take too much notice of it − it
- confused me a lot!
- 4.03
- 3. Examine the files !PC.GenBoot.! Config and !PC.GenBoot.!Modules. If
- you have more than 1M of RAM, it may be worth changing some of the ‘Y’s
- to ’N’s in !Config. When I first tried it, without any changes, my
- screen went blank because my Taxan 795 monitor requires the VIDC
- Enhancer and the VIDCmodes software installed in order to synchronize
- when not in modes 18-21. With a 4M machines, I decided to make all the
- response ‘N’ and everything seemed OK.
- 4.03
- 4. If you have a SCSI hard disc (as I have), run !SCSIDisk. This
- renames !PC.SCSIRun2 to !PC.!Run2 and !PC.!Run2 to !PC.!ADSF[sic]Run2.
- That is, it makes !Run2 the file that defines where the MSDOS partition
- is to be placed − on a SCSI hard disc not on an ADFS one. !SCSIDisk
- then creates a file ‘PC.Drive_C’ on the SCSI disc of the size you
- request (1 to 32M). This file can be *TYPEd from the Archimedes command
- line − but don’t do it until everything is complete because its contents
- misled me! The screen then displays information for running two MSDOS
- commands: FDISK and HDINSTAL. It also displays the injunction ‘Press
- ESC’ to stop: Press RETURN to continue‘.
- 4.03
- 5. If you press <return>, the instructions are cleared from the screen;
- the PC Emulator is loaded, and you are invited to put the MSDOS boot
- disk into ‘DriveA’ (Drive0). Doing so, and pressing <return>, loads
- MSDOS which asks for date and time − but pressing <return> in response
- to each request supplies the information from the system clock. When
- the ‘A>’ prompt appears, you need to carry out the instructions that
- were recently wiped off the screen: Type ‘FDISK’, then ‘1’ to create a
- DOS partition, then ‘Y’ to assign all of file Drive_C to DOS: then
- ‘HDINSTAL’ which formats the hard disc and transfers the MSDOS system
- files from the floppy MSDOS boot disc to the hard disc.
- 4.03
- 6. If you press ESC (at the ‘ESC to stop, <return> to continue’
- injunction) and need to run !SCSIDisk again, beware that this will re-
- rename the !Run2 files. I avoided this by ‘Remming’ the *rename
- statements in !SCSIDisk.!RunImage. (This is a BASIC program from which
- it would appear that the procedure for installing MSDOS on an ADFS hard
- disc would be the same without the complication of renaming the !Run2
- files.)
- 4.03
- 7. Once MSDOS is safely on the hard disc, the !PC application can be
- transferred from the V1.33 disk to the PC directory on the hard disk.
- 4.03
- 8. One last complication fo me was that when I type ‘HDINSTAL’ I go the
- quaint message ‘insert new diskette in drive C’ and, on pressing
- <return>, ‘drive not read − format failure’. Eventually, after many
- hours and several phone calls, the explanation turned out to be that I
- have two external 5.1/4“ drives and MSDOS was seeing the second of these
- as Drive C and the SCSI hard disc as Drive D. To avoid amending
- HDINSTAL (which is a simple batch file) I told RISC-OS that it had only
- two floppy drives (*CONFIGURE FLOPPIES 2, followed by <ctrl-break>) and
- all went smoothly. Subsequently I reconfigured to three floppies and
- now MSDOS wakes up with a ‘D>’ prompt ready to run from the hard disc.
- The most useful tool for finding out what MSDOS thinks it has is to type
- CHKDSKA:.CHKDSKB: etc,
- 4.03
- 9. Finally, in RISC-OS, lock the ‘Drive_C’ file. I’m astonished that
- this is not done by the PCEmulator programs. Without it, a careless
- click in RISC-OS might destroy all your MSDOS files! Bill Mapleson.
- 4.03
- • Saving your configuration settings − I recently needed to change the
- batteries in my Archimedes but this meant that I would lose the
- configuration settings stored in the CMOS RAM. I managed to solve the
- problem by writing two small programs that saved and then restored the
- CMOS RAM settings to and from a file.
- 4.03
- program segment missing
- 4.03
- Sham Gardner, Karlsruhe (Germany).
- 4.03
- (The other way of doing it is to open the computer, switch the computer
- on, change the batteries, switch off and then put the computer back
- together again − but I dare not suggest that you should do that because
- someone might stick a screwdriver into the heavily protected p.s.u. and
- I’d get blames − so I didn’t suggest it, OK? Ed.)
- 4.03
- • Wimpslotting warning. Always give the maximum amount of memory your
- program is going to use. Otherwise, the computer will eat up all the
- available memory and use it for the program and you can’t get the memory
- back unless you quit the application! This happens in FormEd (All
- versions, I would assume). The FormEd !Run file contains the line:
- 4.03
- WimpSlot -min 288k
- 4.03
- Using !Edit, change this line to...
- 4.03
- WimpSlot -min 288k -max 288k
- 4.03
- The program will then run, using up less memory, meaning that both
- !FormEd and !Paint can run at the same time on a 1M machine. You have
- been warned. Duncan Burbidge.
- 4.03
-
- • Cheats − Here are some cheats for various games. (I suggest that if
- you do any of these, you do not use the original disc, but rather work
- on a copy. Ed.)
- 4.04
- Cheat for Minerva’s BattleTank If you run the following program you
- will have however many lives you specified at line 20:
- 4.04
- program segment missing
- 4.04
- Cheat for 4th Dimension’s Inertia - Type in the following and then each
- time you lose a life, you won’t!
- 4.04
- program segment missing
- 4.04
- Cheat for 4th Dimension’s Man-At-Arms − The passwords for the 3 stages
- are: INCUBUS, STRANGE and PULSARS
- 4.04
- progam segment missing
- 4.04
- When you run this program, it will allow you loads of lives, punches and
- lots of energy. Be careful not to set any of the variables at &FF
- because it does tend to make the program crash!
- 4.04
- Cheat for Minerva’s RedShift − Once the game has loaded, type the
- following:
- 4.04
- PHASING GERALD
- 4.04
- Note: When you pressed <11>, the screen will change to the Help screen.
- Take no notice of this and keep typing the rest of the words in.
- Remember that there is a space between the two words!
- 4.04
- If you have entered this correctly, you will hear a bleep. Then just
- press <1> or <2> to play the game and when your Energy is low just press
- <E> and you’ll see the energy level is full again! Also, when your
- TurboEnergy is low press <T> and you will be back to full strength!
- 4.04
- Cheat for 4th Dimension’s E-Type − The following will give you as many
- minutes as you like to get round each track:
- 4.04
- program segment missing
- 4.04
- Type in the above and you’ll have all the time you want to round each
- track! Mark Faulkner.
- 4.04
- • DOS RAM Disc − In DOS, it is possible to set up a RAM disc and indeed,
- for many applications, it is vital to do so if one does not have the
- luxury of a hard disc. Regular DOS supports a maximum of 640 kbytes of
- RAM, although we did learn about Extended Memory in last month’s
- Archive. The problem with a DOS RAM disc is that the memory is actually
- taken from the 640k system RAM. At least it certainly is with current
- versions of the PC Emulator.
- 4.04
- A few months ago, an application appeared on the magazine disc called
- !PCRamDisc. This made use of the fact that the PC emulator can support
- up to two “hard disc” partitions and that one of these could be in the
- Archimedes RAM disc filing system. (In fact one of these can be on an
- ADFS floppy!). In this way, a large RAM disc can be used within DOS
- which does not take anything from the regulation DOS 640k. This seemed
- a really good idea and I was eager to try it out.
- 4.04
- The program which produced the DOS partition is a variation of the Acorn
- program to construct a hard disc partition but with the filing system
- and paths changed and with the allowed partition sizes also changed to
- more convenient values. Having created such a partition, the !Run2 file
- must be modified to tell the machine where the partitions are.
- 4.04
- Then, when the emulator is run, the new “drive” must be initialised
- using FDISK and then formatted using FORMAT. This part really annoyed
- me as I had to do it each time I used the emulator, and I kept for
- getting what to do.
- 4.04
- It seemed a good idea to create a ready-formatted and initialised
- partition before entering the emulator. I am sure someone could write a
- program to do this, but not me. Obviously, it would be silly to store,
- say, a 2 megabyte partition in readiness; this is just a waste of space.
- However, I discovered that an initialised, formatted, but otherwise
- empty DOS partition of one megabyte capacity could be compressed to just
- over a kilobyte using Archimedes ARC, a Public Domain file compression/
- decompression program written by David Pilling.
- 4.04
- On the magazine disc there is an application called !PCRamDisk (note the
- different spelling). This contains a compressed but empty DOS partition
- which is decompressed into the RAMFS before invoking the PC emulator.
- Please read the !Help file before using it as the !Run2 file of the
- emulator is overwritten when the application is run. Brian Cowan.
- 4.04
-
- Hints and Tips
- 4.5
- • ANSI C v3 on a SCSI Hard Disc – After some trial an error, I finally
- managed to install ANSI C v3 correctly on my new Oak SCSI card with 45Mb
- hard disc drive. Here’s what I had to do:
- 4.5
- First change line 3390 in the ‘InstallNet’ program which is on all three
- of the ANSI C discs so that it reads:
- 4.5
- 3390 DATA “ADFS::0.$”,“NET:$”,“SCSI::SCSIDisc4.$”
- 4.5
- Then run the “InstallHD” program from each disc and always answer ‘Y’ on
- the overwrite options (otherwise, the back up program would stop).
- 4.5
- If you use the included !Cstart obey file, you should not ‘*Set
- Run$Path’ in your !boot file and you should remember to modify the
- !Cstart file to work with SCSI and not ADFS i.e. c$loc SCSI::4.$
- 4.5
- Atle Baardholt, Norway
- 4.5
- • Deskjet Plus ink cartridges, recharging − Further to Bill Graham’s
- note in Archive 4.2 p8, I’ve found that Quinx Permanent Black works well
- and is probably cheaper than Art Pen Ink. You do need to be careful that
- you don’t inject more ink than the sponge will absorb, otherwise the
- mess is dreadful! Stuart Bell, Brighton.
- 4.5
- • DropShip passwords − Passwords for DropShip are Dahlia, Gaggle, Kaunda
- and Nautch.
- 4.5
- • ExAllPlus − This is a non-Wimp program which was written in an attempt
- to catalogue my discs. It was designed for use with a single ADFS Floppy
- drive and a SCSI Hard disc together with a Star LC10 printer using
- continuous paper. Other printers may require some alteration to the
- coding.
- 4.5
- Most existing “ExAll” and “CatAll” programs invoke the *EX and *CAT
- calls (!) which produce a lot of unnecessary and confusing duplication
- of libraries, directories etc. (I have memories of the reams of paper
- produced by an “ExAll” print-out of the original Archimedes Welcome
- disc.) To avoid this, these calls have been re-written so that, in
- addition to other changes, the directory headings have been reduced to
- path descriptions.
- 4.5
- The program will produce both screen and printed listings of either the
- full disc or the root directory. The various options are selected by a
- series of key-strokes and a default screen “ExAll” routine has been set-
- up which can be easily customised.
- 4.5
- Use can be made of the condensed print option to produce catalogue
- listings eight entries wide as against the usual five. This rather
- spoils the screen display in this mode but it was thought useful to
- maintain a check on the output to the printer. When using this option to
- produce “EX” listings the screen display is OK and the reverse feed
- facility of the Star LC10 enables double column print-outs to be
- obtained.
- 4.5
- The “GetType” program is loaded in by the main “ExAllPlus” code and
- contains all the FileType codes I have been able to find but it can
- easily be updated.
- 4.5
- (The listing is far too long to put in the magazine. I have put it on
- the monthly program disc. Ed.)
- 4.5
- Doug Tuddenham
- 4.5
- • First Word Plus embedded commands − If you switch off the Word
- Processor mode of FWP you can enter printer commands directly into the
- text. Double bracket command codes e.g. ((n))n1 can be entered to
- change the printer font and style. For example, with a Star LC24-200 in
- the following effects can be achieved:
- 4.5
- Font ((F))0 Times Roman
- 4.5
- ((F))1 Sans Serif
- 4.5
- ((F))2 Courier
- 4.5
- ((F))3 Prestige
- 4.5
- ((F))4 Script
- 4.5
- ((F))5 Draft
- 4.5
- Size ((S))0 Standard
- 4.5
- ((S))1 Double Width
- 4.5
- ((S))2 Double Height
- 4.5
- ((S))3 Double Width and Height
- 4.5
- Colour ((C))0 Black
- 4.5
- ((C))1 Red
- 4.5
- ((C))2 Blue
- 4.5
- ((C))3 Violet
- 4.5
- ((C))4 Yellow
- 4.5
- ((C))5 Orange
- 4.5
- ((C))6 Green
- 4.5
- Peter Thomas, Leics
- 4.5
- • FWP Cut and Paste − It is possible to cut a marked block of text in a
- First Word Plus document and then paste it into another document. Both
- documents must be loaded first. This may be obvious but I have only
- just found out – the hard way. Dave Livsey, Devon
- 4.5
- • Impression hints & tips − Now that I am using Impression for the
- magazine, there are likely to be a number of hints & tips forthcoming.
- Some of these may be obvious to the more experienced Impression users,
- but bear with me because some of us are only just beginning and, in
- fact, the experiences of someone just starting to use an application can
- often be very helpful to others going through the same hoop. Also, when
- you have been using an application for a while, you build up the feeling
- that you know how it works and there may be facilities which you never
- realised were available which new users pick up. Anyway, here are the
- first few...
- 4.5
- Adding styles to titles − If you want to add a style to a title, be sure
- to select the whole line including the carriage return. In other words
- either put the cursor by the left hand margin and drag down to the next
- line or triple-click somewhere on the line. (I’m sure you all know that
- double-click selects a word, triple-click selects a line and quadruple-
- click (or <ctrl-@>) selects a whole paragraph.) The reason for selecting
- in this way is that if you only select by dragging across the line, you
- omit the carriage return which remains in the base style. The problem
- with this is that if, as in the title lines in Archive, the added style
- says “reduce the space after the paragraph to zero”, the carriage return
- still has the full space-after-paragraph so the paragraph spacing
- remains unchanged.
- 4.5
- Entering point sizes − If you want to change the size of some text, you
- mark it and press <shift-ctrl-S>. If the dialogue box is empty, you can
- type in a number, say 18, and it will assume you mean 18 point. If you
- decide that you want it a bit bigger and press <shift-ctrl-S> again, it
- comes up with “18pt” in the box. If you then type in, say, 2 <return> it
- will interpret the “18pt2” as (18+2)pt and will give you 20pt! (Well, it
- works in version 2.05.) Unfortunately, if you press <-> to try to put,
- say, -2, it seems to interpret it as an escape and closes the box.
- 4.5
- Marking, deleting and re-typing − (This is something that is obvious to
- people coming to Impression via the Mac but may have been missed by
- people brought up through RISC-OS.) If some text is marked, by any
- means, and you want to replace it by some text you are about to type in,
- there is no need to delete the marked text first. As soon as you start
- to type, the marked text is deleted and transferred to the scrap-pad and
- your typing appears in place of it. The deleted text can be used
- elsewhere by pasting it in with <ctrl-V>.
- 4.5
- Quick searching − If you want to find something quickly, find/replace is
- a good way to do it. Call it up with <ctrl-f4> and then, to delete the
- text already in the dialogue box, press <ctrl-U>, then type in the word
- you are looking for and press <return>. (This use of <ctrl-U> applies to
- all dialogue boxes − useful when saving a document under a new name.)
- Remember though that it searches from the cursor downwards, so add a
- <ctrl-uparrow> before calling up the find/replace box. (In the version I
- have, 2.05, the cursor is sometimes not re-displayed in its new position
- after a find/replace has been executed. In other words, it appears to be
- still where you left it but it may actually be further down the document
- so it’s worth getting into the habit of using <ctrl-uparrow> anyway.)
- Also, don’t get tripped up, as I just did. If you set the “case
- sensitive” option, it stays set until you switch it off again. So, if
- you can’t find a word that you know is in there somewhere, check that
- you have not left it in the case-sensitive mode from the last time you
- used it.
- 4.5
- Replacing double spaces − I was trying to do a selective search and
- replace to remove double spaces and replace them with single spaces.
- When I told it to find the next one, it sometimes didn’t appear to mark
- anything. Most peculiar! Eventually, I realised what was happening. The
- text was fully justified and the double spaces (the same would apply to
- finding single spaces) were between the last word on one line and the
- first on the next line. Thus Impression was marking the infinitesimally
- small space at the end of the line, i.e. was marking nothing at all.
- There’s nothing you can do about it (apart from removing the full
- justification) but at least if you are aware of the problem, you won’t
- be so baffled when it happens.
- 4.5
- Searching for hyphens − In some versions of Impression, it is not
- possible to search and replace hyphens. I discovered this because, for
- ease of typing, I was using a double hyphen where I wanted a dash in the
- text, the idea being to replace them later. Impression refused to find
- any occurrences of hyphen-hyphen. Consultation with CC revealed that
- improvements in automatic hyphenation have resulted in this problem. The
- way round it is to search for — and replace it with −. Note the spaces
- after the backslash and before the 45.
- 4.5
- Smart quotes − If you want smart quotes in a text, i.e. the curly ones
- instead of the straight ones on the key next to the return key, you can
- type them in using <ctrl-]> and <ctrl-\> for single quotes and <shift-
- ctrl-]> and <shift-ctrl-\> for double quotes. However, if you think
- that’s a bit of a fag to remember, use the normal quotes and then,
- before printing, save the file (just in case of operator error!), save
- the text with styles (perhaps to a ram disc as it’s only temporary),
- select the whole text (<ctrl-T>), delete it and finally drop the saved
- text back into the document. As the text is re-loaded, quotes are
- automatically ‘smartened’.
- 4.5
- Switching styles on and off − Those of you brought up in the Mac world
- may not have realised, as I didn’t until today(!) that if you want
- something in, say, bold, all you have to do is press <f4> to switch it
- on, type in the bit that is to be in bold and then press <f4> again.
- Obvious? Yes, it may be to those who come new to Impression but for
- those of us steeped in Mac techniques, it comes as a welcome surprise.
- 4.5
- If there are things about using Impression that ‘came as a surprise’ to
- you, send them in to us (preferably on disc) and we’ll share them with
- other Impression users. We may even need an Impression Column.
- 4.5
- • Rotor and other games’ passwords − One way to obtain the Rotor
- passwords (and possibly other games) is to load each of the game’s files
- into !Edit and use the ‘Find’ option to look for the first password.
- When the password is found, the remaining passwords should be in the
- next couple of lines. Andrew Campbell, Devon
- 4.5
- • Sony TV / Monitor − I was told by Beebug that I couldn’t use my Sony
- TV as a monitor with the A3000, but in fact this is quite easy to do.
- The sony TV requires a signal on pin 16 (blanking input) of the Scart
- plug, which can simply be connected to pin 20 (video input). Keith
- Raven, Slough
- 4.5
- • Z88 file transfer − Here is a little utility for people who wish to
- transfer files from the Archimedes straight into suspended memory on the
- Z88. It saves having to break a file into smaller sections first and,
- of course, there is always a memory overhead in having at least part of
- the file held in the Z88 Filer. With this BASIC program, the filer is
- by-passed altogether.
- 4.5
- 10 REM >Suspender
- 4.5
- 20 REM Transfer file from Arc to Z88 suspended memory
- 4.5
- 30 REM ** IMPORTANT: Set z88 receive baud rate at 2400 (in panel) **
- 4.5
- 40 *CAT
- 4.5
- 50 *FX 8,5
- 4.5
- 60 INPUT “Send file? ”file$
- 4.5
- 70 *FX 3,119
- 4.5
- 80 OSCLI(“Type ”+file$)
- 4.5
- 90 FOR i%=1 TO 350
- 4.5
- 100 PRINT “#”
- 4.5
- 110 NEXT i% : REM these pad chars are need for certain types of file
- 4.5
- 120 *FX 3,0
- 4.5
- To load a file into PipeDream, enter “:COM” as the “Name of file to
- load” in the files menu. Then run “Suspender” and immediately press
- <return> on the Z88. Finally, when the BASIC prompt reappears on the
- Archimedes screen, press <esc> on the Z88.
- 4.5
- It is kinder to your disc drive to copy the target file into the
- Archimedes’ RAM filing system first.
- 4.5
- Jonathan Barnes, Watford
- 4.5
- The following Hints and Tips come from Hugh Eagle of the West Sussex
- Archimedes User Group.
- 4.5
- • Disappearing paragraph spaces in FWP – If, at the end of a paragraph,
- you type a space immediately before the carriage return, the carriage
- return will be deleted when you subsequently reformat the paragraph.
- Believe it or not, this is a “feature” of First Word Plus (documented in
- the version 1 manual on page 110)!
- 4.5
- • Loading sprite files – When you double click on a sprite file icon,
- sometimes it is displayed at the bottom left-hand corner of a blank
- screen and sometimes in a !Paint window. This is because the action the
- computer takes when you try to “run” a sprite file depends on the
- contents of the system variable Alias$@RunType_FF9. This variable is
- defined by default, when the Archimedes is switched on, as “ScreenLoad
- %0”. The effect of this is that when you double click on a sprite file
- (type &FF9) icon, the operating system executes the instruction
- *ScreenLoad [filename]; this clears the screen and then displays the
- first sprite in the file at the graphics origin. However, when the
- Desktop Filer “sees” the !Paint application (i.e. when a directory
- window is opened in which !Paint is included) it runs the !Paint.!Boot
- file which, amongst other things, redefines Alias$@RunType_FF9 in such
- a way that when a sprite file is “run” the !Paint application is started
- up (that is if it is not already running) and the file is loaded in.
- 4.5
- • Listing the contents of your (hard) disk – The operating system
- command “*Count :4.$.* RV” will catalogue the contents of the root
- directory and every sub-directory. As explained on pages 279/280 of the
- User Guide, the output from this command can be redirected to the
- printer by adapting the command to “*Count :4.$.* RV {printer: } ”
- 4.5
- Note: the spaces around the curly brackets and the > sign are important.
- 4.5
- This method will redirect the output to the printer without displaying
- it on the screen. An alternative method will send all text that is
- displayed on the screen to the printer as well: first press <ctrl-B>
- (i.e. hold down the ctrl key and simultaneously type B), then issue the
- command “*Count :4.$.* RV” then, when the listing has finished, press
- <ctrl-C>.
- 4.5
- • Removing PC Access – The menu which appears when you click the menu
- button over any of the PC Access icons on the icon bar has no Quit
- option and the application doesn’t seem to appear in the Task Manager
- window. In fact, the application does appear in the Task Manager window
- ... in the “Module Tasks” section. Clicking the menu button over the
- application’s name there and moving to the Task ‘PC Access’ sub-menu
- gives a “Quit” option.
- 4.5
- • Printing via a PC – For some time I have been perplexed to find that
- when I try to print a file created by the Archimedes !PrinterLJ printer
- driver to a LaserJet printer attached to a PC, the printout stops part
- way down the page. At first I thought it must be because of limited
- memory in the printer so I tried creating the file at a lower print
- density but this made no difference to how much of the page was printed.
- 4.5
- I think I have now hit on the answer, namely that, when using the MS-DOS
- Copy command to print a file which includes control codes, it is a good
- idea to use the /b “switch”, using the syntax:
- 4.5
- copy [filename]/b LPT1
- 4.5
- The insertion of /b after the filename causes MS-DOS to copy in “binary”
- mode: i.e. it copies as many bytes as there are in the file. Otherwise,
- in text mode, copying will continue only until the first end-of-file
- marker (Ctrl-Z or ASCII character 26) is reached whereupon it will stop.
- It is of course highly likely that a graphic printfile of many thousands
- of bytes will contain this character several times, so it is not
- surprising that only part of the page is printed!
- 4.5
- • Viewing !Draw files – The standard way to view a draw file is to load
- it into !Draw. However, this has an irritating tendency to place the
- part of the picture you want to see outside the visible window. There
- are (at least) two convenient ways of avoiding this problem:
- 4.5
- One is to load the file into the !Display application from Shareware 26.
- The other is to load it into an Impression frame (or, presumably, a
- frame in one of the other DTP applications). In either case, the drawing
- is scaled to fit the frame (the aspect ratio is preserved, so the
- picture fills either the height of the frame or the width). One
- advantage of Impression is that the frame can very easily be resized and
- the drawing thereby magnified; another is that it makes it very simple
- to display a number of drawings on a page and create an illustrated
- catalogue.
- 4.5
- • Floppy disc E format – So far as I know, the detailed format of ADFS
- discs has not been published either in any of the manuals or in Archive.
- Having recently deleted some files by mistake and been forced into some
- detective work in order to recover them, I thought it might be helpful
- to write down what I have found out about “E” format floppy discs:–
- 4.5
- With two sides, 80 tracks on each side, 5 sectors on each track, the
- disc has 800 sectors of 1024 (&400) bytes each. The sectors can be
- thought of as being numbered from 0 to 799 in the following order:
- 4.5
- Track Head Sector
- 4.5
- 0 0 0
- 4.5
- 0 0 1
- 4.5
- 0 0 2
- 4.5
- 0 0 3
- 4.5
- 0 0 4
- 4.5
- 0 1 0
- 4.5
- . . .
- 4.5
- 0 1 4
- 4.5
- 1 0 0
- 4.5
- . . .
- 4.5
- . . .
- 4.5
- 79 1 4
- 4.5
- Each byte on the disc has a “disc address” equal to the sector number,
- as defined above, times &400 plus the number of bytes into the sector.
- Put it another way:
- 4.5
- the disc address = (((( track * 2 ) + head ) * 5 ) + sector ) *
- &400 + bytes into sector
- 4.5
- Map format − The first two sectors on the disc contain duplicate copies
- of the disc map. The first 64 bytes of the map contain the following
- information:
- 4.5
- byte 0 a checksum byte
- 4.5
- bytes 1/2 the number of bits to the place in the map which marks the
- first free space on the disc, counting from the beginning of byte 1 (if
- there is no free space this number will be zero); the top bit of the 16
- is always set, so, for instance, the value &8310 in these two bytes
- would indicate that the first free space in the map could be found &310
- bits or &310 DIV 8 bytes from byte 1, i.e. at byte &63
- 4.5
- byte 3 &FF
- 4.5
- bytes 4-35 the “disc record” as described on pages 1012/3 of the PRM
- containing various details about the disc size, etc. which are the same
- on all “E” format discs, ending with the Disc ID at bytes 24/5 and the
- disc name from byte 26 to byte 35.
- 4.5
- bytes 36-63 reserved (all zero)
- 4.5
- bytes 64-863 (800 bytes) – the actual disc map.
- 4.5
- Each byte in the map represents one disc sector and the contents of the
- map indicate how the disc is divided up between the various objects
- (directories and files) on it. Each portion of the map is at least 2
- bytes long, it begins with an identifying number (max. 15 bits), ends
- with a 1 in the top bit of the last byte and all the bits in between are
- zero. Thus, for instance, if the file with the identifying number 7
- occupies 3 sectors the relevant portion of the map reads as follows:
- 4.5
- first byte &07
- 4.5
- next byte &00
- 4.5
- last byte &80 (1 in the top bit)
- 4.5
- The lowest identifying number is 2 and is reserved for the four sectors
- which are initialised when the disc is formatted and which comprise the
- two map sectors followed by the two sectors containing the root
- directory. Identifying numbers are then allocated, in order, as new
- objects are created.
- 4.5
- A file may be fragmented into several pieces, in which case several
- portions of the map will contain the same identifying number.
- 4.5
- The portions of the map indicating free space on the disc are linked
- together by a chain of pointers. As mentioned above, bytes 1 and 2, at
- the start of the map sector, point to the first free space in the map.
- At that point there is a similar pointer to the next free space (if any)
- and so on until the last free space is reached, where the pointer is
- zero.
- 4.5
- A defective sector on the disc is identified in the map by number 1.
- 4.5
- Directory structure − Each directory takes up two sectors. As mentioned
- above, the root directory occupies the third and fourth sectors on the
- disc (from disc address &800 to &FFF). Any sub-directory can be located
- by looking up the relevant entry in its parent directory, finding the
- identifying number (in the manner described below) and looking up the
- number in the disc map.
- 4.5
- The first five bytes in a directory contain a checksum byte followed by
- the string “Nick”. Then there are up to 77 entries of 26 bytes each
- representing the various objects (files and sub-directories) in the
- directory.
- 4.5
- The format of each of these entries is:
- 4.5
- bytes 0-9 name of file or sub-directory
- 4.5
- bytes 10-13 load address
- 4.5
- bytes 14-17 execution address
- 4.5
- bytes 18-21 file length
- 4.5
- byte 22 sector offset (see below)
- 4.5
- bytes 23-24 identifying number as used in the map
- 4.5
- byte 25 file attributes.
- 4.5
- If the top 12 bits of the load address are all set (i.e. are &FFF) this
- means that the file is “stamped” and the remainder of the load and
- execution address fields are used to record the file type and date stamp
- as follows:
- 4.5
- load address FFFtttdd
- 4.5
- execution addressdddddddd
- 4.5
- (the bottom byte of the load address field being used for the top byte
- of the 5-byte format date and time record).
- 4.5
- Note: in a disc sector editor which shows the bytes in order with the
- lowest byte of each word first, these 8 bytes will appear as “dd tt Ft
- FF dd dd dd dd”.
- 4.5
- If not all the top 12 bits are set, the load and execution addresses
- will (as their names suggest) determine what the computer does when the
- file is *LOADed or *RUN (or double-clicked from the Desktop).
- 4.5
- The sector offset in byte 22 is used where two files are mapped into the
- same portion of the disc. In such a case the files share the same
- identifying number (in bytes 23/4) but byte 22 indicates how many
- sectors into the portion each file starts.
- 4.5
- A typical example of this would involve two small files each fitting
- into one disc sector (they might for instance be !Boot, !Run or !Sprites
- files within an application directory). Because the minimum size of a
- map entry is 2 bytes representing 2 sectors on the disc, it would be
- inefficient to give each file a separate map entry, so the two files
- would be made to share. In this case, assuming the shared identifying
- number is say 8, bytes 23 and 24 of the directory entries for both files
- would be &08 and &00 but byte 22 would be &01 for the file that occupies
- the first sector and &02 for the second.
- 4.5
- In the usual situation where a file has a map entry to itself, byte 22
- is zero.
- 4.5
- The bits of byte 25 (the file attributes byte) are used as follows:
- 4.5
- bit 0 object has read access for you
- 4.5
- bit 1 object has write access for you
- 4.5
- bit 2 undefined
- 4.5
- bit 3 object is locked against deletion
- 4.5
- bit 4 object has read access for others
- 4.5
- bit 5 object has write access for others
- 4.5
- bit 6 undefined
- 4.5
- bit 7 undefined
- 4.5
- Bits 4 and 5 only have meaning to the network filing system. Bits 2, 6
- and 7 should be set to zero.
- 4.5
- General note: If you want to explore disc maps and directories it is
- very handy to have a disc sector editor such as the !DiscEdit appli
- cation on Careware 2. Failing that it is reasonably easy to construct a
- program to read from a disc sector by sector (rather than file by file)
- and to display the contents. The key to such a program is the SWI call
- “ADFS_DiscOp”. For instance, the BASIC instruction:
- 4.5
- SYS “ADFS_DiscOp”,0,1,address%,buffer%,length%
- 4.5
- will read starting at the “disc address” (as defined above) given in the
- variable address%, the number of bytes given in length% (1024 for one
- sector) into the address in RAM stored in buffer%. Obviously, a certain
- amount of caution is advisable since a very similar command (replacing 1
- with 2 for instance) could result in writing to and corrupting the
- contents of a disc.
- 4.5
-
- 4.5
-
- 4.5
- {4 .5
- • Caverns − A simple map and the passwords are given at the end of the
- magazine on page 60. Neil Berry
-
- Impression Hints and Tips
- 4.6
- Here are a few more hints and tips mostly from the editor’s dabblings in
- preparing the magazine...
- 4.6
- • Dashes − If you, like me, don’t like to see hyphens used where dashes
- should be used − i.e. in places like this − you will probably be sick
- and fed up of typing <alt-153>. (Note that the character in “alt-153” is
- a hyphen, just in case you weren’t aware of the difference.) If you are
- importing text into Impression, occurrences of ‘hyphen hyphen’ will be
- converted automatically by Impression into a long dash — see what I
- mean. Personally, I prefer the shorter one so what I have done is set up
- the abbreviation dictionary with ‘expand as you type’ and used an
- underline character to be turned into a dash. The only drawback is that
- it’s OK for things like the dashes earlier in this paragraph, but if,
- for example, you use dashes in phone numbers, as 0603−766592, the
- abbreviation technique does not work and you are back to <alt-153>.
- Anyone any other ideas?
- 4.6
- • Find styles − If you want to find a style, get up the find/replace box
- with <ctrl-f4> and then click in the menu box to the right of the Find
- box and select the style you are looking for. This will come up as, say,
- “”. Type an “@” after this − which stands for “any text” − and then
- press <return>. This will highlight the whole of the first piece of text
- with that style or effect. Unfortunately, the facility to replace that
- style with another style is not yet working. If you do want to do any
- search and replace on the style names, export the text, with styles, and
- then use another WP such as !Edit to do the searching and replacing
- before returning it to Impression.
- 4.6
- • Rogue effects − Someone sent me a file in which they had used a
- particular font which I did not have so when I loaded the file,
- Impression told me it was changing it to Trinity.medium. I did an edit-
- style and looked at all the style definitions to no avail. Eventually, I
- realised that it must have been used as an effect, so how was I to find
- it and eliminate it or change it to some font I did possess? Because the
- font had been changed to Trinity.medium (i.e. the BaseStyle font) I
- could not pick it out with a visual scan so the first idea was to change
- the BaseStyle to, say, Zapf.Dingbats so that anything which was in a
- different font was obviously an effect or a style. Unfortunately, this
- didn’t reveal the offending effect. At this point, I became convinced
- that I had a non-existent, un-removable effect, i.e. a bug in Impres
- sion. So I sent the offending file to CC who informed me that the
- particular effect WAS in the text and they also showed me how to locate
- it... as follows...
- 4.6
- (Actually, the reason that I couldn’t find the effect was that I had
- already gone through the document adding extra styles and had covered
- this rogue font-change effect with a font-change style of my own. In
- other words, the style, because it was applied later than the effect,
- took precedence.)
- 4.6
- • Finding effects − In the same way that you can find styles (see above)
- you can also find effects as long as you tell Impression that you want
- effects to be shown on the style menu. To do this, locate the file “UK”
- in the Impression “Resources” directory. Load it into !Edit and find
- “Cnf1:” and change it to “Cnf1:E” − that’s a one, not a letter “l”. Save
- the file and shut down and re-start Impression. You then will have
- effects on your style menus and search on {“effectname” }@, as explained
- above.
- 4.6
- • Fast search and replace − There are a couple of very useful keyboard
- short-cuts not documented in the manual which speed up the search and
- replace. When the “text found” box is on screen, <ctrl-R> does a
- “Replace” and <ctrl-N> moves to the “Next”.
- 4.6
- • Keyboard short-cuts − Apart from the ones listed on pages 119ff of the
- Impression manual, here are a few more: (some are mentioned on the menu,
- but not in manual)
- 4.6
- <ctrl-shift-D> go to chapter
- 4.6
- <ctrl-shift-H> produces a bullet i.e. a “•”.
- 4.6
- <ctrl-shift-I> also produces a bullet i.e. a “•”!
- 4.6
- <ctrl-shift-J> produces superscript
- 4.6
- <ctrl-shift-K> produces subscript
- 4.6
- <ctrl-shift-T> save text story
- 4.6
- • Page number justification problems − Some of you may have had
- difficulty getting correct centring or right justification of page
- numbers on footers. This is corrected in version 2.09 − well, almost!
- The footers on right hand pages were wrong last month, when I was using
- version 2.05, (in fact I didn’t even notice!) and the footers on the
- left hand pages would have been wrong this month (with 2.09) if I had
- not found a way round it. If you try to have left aligned page number
- with a right tabbed piece of text, the text suffers a left shift. I’ve
- solved it for now by splitting the footer text into two separate frames,
- one left aligned and the other right aligned. It’s messy, but it works.
- A
- 4.6
-
- Hints and Tips
- 4.7
- • Ballarena − I would advise using the mouse to control your ‘bat’
- because the keyboard is not very responsive. Also, note that the ‘Auto’
- bat does not always respond fast enough to catch the ball, and there is
- nothing you can do about it! I was very disappointed in the final
- message which just congratulates you, and ends your game. The passwords
- are: PUNKANDJUMP, MONTPELLIER, SEA SEX SUN, VL 86 C 010, MOUNTAINEERS,
- GRENOUILLE, BLUBEDILOMAR, BRAIN KILLER, RHYTHM BOX, BOUBOULOID, MENFOU,
- 32 BIT POWER, MARTINI, SEE YOU SOON, ETERNA. Mike Gregory (& Russell
- Lamb).
- 4.7
- • Changing !Edit’s default file types − Answering my own Help!!! plea in
- Archive here’s how to change the default filetypes for !Edit:
- 4.7
- *DIR ADFS::4.$.RISC-OS.!Edit
- 4.7
- (or your path here)
- 4.7
- *GOS
- 4.7
- *L. !RUNIMAGE 8000
- 4.7
- *BREAKSET 8004
- 4.7
- *GO 8000
- 4.7
- *SAVE “!RUNIMAGE” 8000+1F2C0
- 4.7
- 8008 8000
- 4.7
- *BASIC
- 4.7
- *L. !RUNIMAGE 8F00
- 4.7
- $&1B208=“ReadMe” These can be changed
- 4.7
- $&1B214=“DataFile” to suit your needs
- 4.7
- $&1B220=“ExecFile” with any string up
- 4.7
- $&1B22C=“EditFile” to 10chars in
- 4.7
- $&1B238=“!Run” length.
- 4.7
- *SAVE !RUNIMAGE 8F00+1F2C0 8008 8000
- 4.7
- Rob Davison, Southland, New Zealand
- 4.7
- • ‘Cheapo’ dialog boxes − You can make use of Wimp_ReportError instead
- of writing code for a dialog box when programming wimps. The following
- code fragment is an example:
- 4.7
- DEFPROCsave_file(name$)
- 4.7
- IF FNfile_there(name$) THEN IF
- 4.7
- FNdialog(“A file of that
- 4.7
- name exists. Overwrite it?“)=FALSE THEN ENDPROC
- 4.7
- REM save file
- 4.7
- ENDPROC
- 4.7
-
- 4.7
- DEFFNdialog(str1$):!block%=1
- 4.7
- :$(block%+4)=str1$
- 4.7
- SYS“Wimp_ReportError”,block%,
- 4.7
- 19,“Message from
- 4.7
- applic“ TO ,resp%
- 4.7
- =resp%=1
- 4.7
- where the string “Message From Application” is <20 characters in length.
- 4.7
- The only disadvantages are that all other desktop activity is suspended,
- the machine beeps (if wimpflags bit 4 is not set) and that the user has
- to answer “OK” or “CANCEL” instead of the more logical “YES” or “NO”.
- However, this saves a great deal of programming and can be very useful
- at times (This is why FWP2 stops printing − See Archive 3.10 p 25). Rob
- Davison, New Zealand.
- 4.7
- • Cleaning A310 keyboard contacts − I recently had a very nasty
- intermittent fault on my A310. It began as a line of 222222222’s being
- printed at the cursor, for no apparent reason. Also the ‘2’ key of the
- numbers keypad wouldn’t function occasionally. This was accompanied by a
- more worrying symptom where the screen display would suddenly go hay-
- wire and only occasionally would right itself after switching the
- machine off and then on.
- 4.7
- Eventually, it was cured by cleaning the key-contact of the ‘2’ (keypad)
- and on the basis of “If it works, don’t fix it”, I didn’t clean any
- other keys. After having the machine checked at a local dealer (£17.50)
- and some discussion with Archives’ Technical Help, it was assumed that
- the screen break-up was due to CMOS *Configuration settings somehow
- being changed to Monitor-Multisync, by the spurious keyboard input. The
- problem has not occurred since.
- 4.7
- For anyone else with keyboard problems, here’s how I cleaned mine: Lay
- the keyboard upside-down and remove all 8 screws under the keyboard base
- and gently lift off the base. Remove the 6 larger screws, securing the
- PCB to the keyboard top-cover. Lift out the complete PCB and keys unit.
- The keytops are all secured in a frame which is, in turn, secured by 20-
- odd small screws from the PCB underside. Take them all out (and put them
- somewhere safe) and, keeping the whole kaboodle together with a firm
- grip, turn it over and set it down right-side up. The complete set of
- keys can now be lifted slowly off the PCB, exposing the rubber contact/
- covers. These are glued with a weak glue. I found that all the rubber
- bits stayed stuck to the PCB. I gently peeled away the rubber contact/
- cover at the offending key position and marvelled at how the dirt had
- managed to penetrate so far, considering that the cover was stuck down.
- The keyboard key contacts (A310) are just gold plated discs of PCB
- copper, easily cleaned with switch cleaner and a non-hairy paper-towel
- or cloth. If you have to blow away any bits, use a camera ‘puffer
- brush’. If you have to use your mouth to blow away grit, crumbs etc,
- wait for any teeny drops of condensation to evaporate. Spit doesn’t make
- a good contact cleaner and some spirit-based cleaners may tend to
- dissolve the pcb-surface varnish which will be smeared over the
- contacts’ surface. Your local electronics hobby shop (e.g. Tandy) should
- have cans of switch-cleaner at £2 − £3 (which is a lot cheaper than £120
- for a new keyboard(!) and well worth the extra effort of DIY).
- 4.7
- D.P.Allen, Surrey
- 4.7
- • Data cartridges for tape streamers revisited − Further to the hint in
- 3.6 p2, the metal variety of DAT can become unreliable after three or
- four writes and so it is better to use the non-metal variety e.g.
- Memorex tapes. Mr Chapman, London
- 4.7
- • RISC-OS printing hints − Printing out with the RISC-OS printer drivers
- is very easy. However I found several areas which are not well explained
- and one or two things which are down right misleading!
- 4.7
- • PRM pages 1526-1528 sprite plotting commands must be with reference to
- the address of the sprite not the name, so if you use
- 4.7
- SYS “OS_SpriteOp”,&122,
- 4.7
- spriteaddr%,“name”,0
- 4.7
- ,xpos%,ypos%
- 4.7
- then, when printing, the error “Sprite Not known” will be returned. The
- solution is to use &222 and an address instead of the sprite name.
- Addresses for a named sprite can be found with
- 4.7
- SYS“OS_SpriteOp”,&118
- 4.7
- addr is in R2 on exit − see PRM page 406.
- 4.7
- • PRM page 1532. Always use −1 (for current) as the destination mode
- with “ColourTrans_Select-Table” if you specify a mode (even the current
- one) ColourTrans will not set up the table correctly resulting in
- strange looking sprites on printout.
- 4.7
- • When rendering Draw objects remember to decrease ‘flatness’ to a lower
- value. A useful way of calculating it is to divide the default (512) by
- the print resolution divided by 90 eg. flat= 512/(printxres%/90) where
- printxres% might be 300 − as read from
- 4.7
- SYS “PDriver_Info” TO,printxres%
- 4.7
- printyres% the 90 comes from a normal approximately 90 dots per inch on
- screen. Rob Davison, Southland, New Zealand
- 4.7
- • Saving the CMOS RAM settings − In recent editions of Archive (e.g.
- 4.3, p.10 and 4.5, p. 21) there have been repeated mentions of the
- problem which arises when a battery failure deletes all the information
- in the CMOS RAM.
- 4.7
- There is one very simple way of solving this problem: On Careware Nº 6
- you will find the application !SysUtil by Jon Marten; one of the choices
- it offers is “Save Configuration”!
- 4.7
- All you have to do is copy the Utility and the “ConfigFile” it produces
- to some disc where they are easily accessible − not the hard disk!
- 4.7
- After the dreaded memory loss you simply load !SysUtil and drag the
- ConfigFile icon onto the !SysUtil icon and confirm that you want to
- change the configuration. Jochen Konietzko, Koeln, Germany
- 4.7
- • Shutdown of hard drives − During the recent experience I have had due
- to the volume of hardware I’ve been setting up and testing, the
- following items have come to light.
- 4.7
- MR45’s seemed to be suffering from corruption but, when reformatted, the
- problem went away, so where did the corruption come from?
- 4.7
- A little further investigation revealed that a verify scan caused the
- Closedown procedure of the drive not to occur.
- 4.7
- It was found that, in order to close the drive down properly, a *bye and
- two ªShutdowns were required! At first, this was thought to only relate
- to MR45’s but, in fact, it has been found that this is not so, and even
- my own machine (A440/1 with standard Acorn hardware) does similar
- things.
- 4.7
- So, how do you know whether your hard drive is shut down properly? If an
- <f12> is followed by a *bye, a staccato blip from the drive LED should
- occur and a short sharp click noise should emit from the drive itself.
- This is not the closedown condition.
- 4.7
- A *shutdown will now give a flickering performance from the drive LED
- and a multiple clicking from the drive lasting about half a second.This
- is the shutdown condition with the heads parked and isolated from the
- discs and closedown of the system can now occur. Ray Maidstone, Norwich.
- 4.7
- • !UIM_Hack update (cf Archive 3.10 p 9) − This utility allows you to
- edit characters in The 4th Dimension’s U.I.M. game. It has now been
- updated and improved by the author, David Sheperdson, and has been put
- on this month’s program disc.
- 4.7
- Impression Hints and Tips
- 4.7
- • Beware thin lines − It seems that Impression can’t cope with the very
- thinnest lines that Draw can produce. It does not display them properly
- on the screen and sometimes doesn’t print them properly. The answer is
- to use 1 mm lines instead. This came to light when Brian Cowan was using
- graphs generated by the graph plotting utility (on Shareware Nº 31)
- which apparently uses these thin lines. (This has only been tested in
- version 2.05.)
- 4.7
- • Double-clicking on a graphic opens the “alter graphic” window, (For
- those who don’t read manuals.)
- 4.7
- • Help! − Does anyone know how to create a new Master Page based on an
- existing master page? It’s a real pain to have to change the margins
- every time you create a new master page. Why can’t you have a new master
- page just slightly different from an existing one? The particular
- application was where I wanted to try two, three, four, five columns
- etc. for a document and every time I wanted to change the number of
- columns, I had to create a new master page, changing the margins from to
- the 5 mm I wanted before changing the number of columns and the inter-
- column gap. (Mind you, I did find one short-cut as a result of having to
- do this over and over again. If you click in the first margin box, you
- can use <ctrl-U> to remove the “12.7mm”, then press <5> and then <down>
- will move you to the next box and you can repeat the <ctrl-U>, <5>,
- <down> for each box. This applies to most of the dialogue boxes − <down>
- moves you to the next box requiring input. Yes, I know it says this in
- the manual, but I didn’t see it.)
- 4.7
- Anyway, can I put my plea another way? Is there any way of editing a
- master page other than sliding the boxes around? Can you edit, by
- entering numbers, the sizes of the margins, for example?
- 4.7
- • Search & replace again − We mentioned last month that, when doing a
- find and replace, <ctrl-N> finds the Next occurrence, <ctrl-R> does a
- Replace of the marked text. Be warned though that, if the find box is
- on-screen, <ctrl-A> no longer deletes the character at the cursor (as
- <copy> does) it forces All the replaces to occur from the cursor
- downwards to the very end of the document. I found this the hard way
- while attempting to do a selective search and replace at the top of a
- large document. I was changing a column of words into a list by
- replacing
- 4.7
- with a comma and a space. You can just imagine the havoc that the
- “replace all” command reeked on my (unsaved!!!) document. You have been
- warned! By the way, <ctrl-E>, presumably relating to Every or End, has
- exactly the same effect as <ctrl-A>. (This has only been tested on
- 2.09.)
- 4.7
- • Transferring text between documents − In Archive 4.2 p.8, there was a
- hint about the transfer of text between two documents. The implication
- was that this was not possible with Impression. This is not true − it is
- just done differently. You select the text in question, press <ctrl-C>,
- move to the appropriate spot in the other document, click once and
- insert the text with <ctrl-V>! Jochen Konietzko, Koeln, Germany A
- 4.7
-
- Hints and Tips
- 4.8
- • ARM code errata − The following is for all those who have an unshak
- able faith in the integrity of Acorn’s code:
- 4.8
- The code given to return from SWI “OS_ BreakPt” on page 736 of the PRMs
- is incorrect. The following works.
- 4.8
- .backtobreak%
- 4.8
- SWI “OS_EnterOS”
- 4.8
- ADR R14,breaksave
- 4.8
- LDMIA R14,{r0-r14 }^
- 4.8
- LDR R14,[R14,#15*4]
- 4.8
- ADD R14,R14,#4
- 4.8
- MOVS PC,R14
- 4.8
- The code given on page 231 of the old BASIC User Guide (under CALL) is
- incorrect. For example, to use MATCH, the line tokenisation routine, the
- following code will work. This has been corrected in the new BASIC User
- Guide.
- 4.8
- .tokenise
- 4.8
- STMFD R13!,{r14 }
- 4.8
- ADD R0,R14,#18*4
- 4.8
- ADR R1,source
- 4.8
- ADR R2,dest
- 4.8
- MOV R3,#1
- 4.8
- MOV R4,#0
- 4.8
- ADR R14,cominghome
- 4.8
- MOV PC,R0
- 4.8
- .cominghome
- 4.8
- LDMFD R13!,{pc }
- 4.8
- .source
- 4.8
- EQUS STRING$(90,CHR$(0)) ALIGN
- 4.8
- .dest
- 4.8
- EQUS STRING$(90,CHR$(0)) ALIGN
- 4.8
- J Heher, South Africa
- 4.8
- • BASIC printing to a DeskJet Plus − The April issue of Archive
- contained a Help!!! plea about printing from Archimedes BASIC to a
- DeskJet 500. I have a DeskJet Plus and have successfully printed from
- BASIC. For reference, my printer is normally set with the function
- switches 6 and 8 in bank A and 2 in bank B up, all others are down.
- 4.8
- To print, I use the command VDU 2,1,27,1,38, 1,107,1,49,1,71 (see Line
- Termination in Appendix 8.19 of the Owner’s Manual). Here is an example
- of how it can be used:
- 4.8
- 10 REM >PrintTest
- 4.8
- 20 VDU 2,1,27,1,38,1,107,1,49,1,71
- 4.8
- 30 PRINT “TEST OF NORMAL PRINTING”
- 4.8
- 40 VDU 1,27,1,38,1,100,1,49,1,68
- 4.8
- 50 PRINT “This is underlined”
- 4.8
- 60 VDU 1,27,1,38,100,1,64
- 4.8
- 70 VDU 1,27,1,40,1,115,1,51,1,66
- 4.8
- 80 PRINT “This is BOLD printing”
- 4.8
- 90 VDU 1,27,1,40,1,115,1,48,1,66
- 4.8
- 100 VDU 1,27,1,40,1,115,1,50,1,48, 1,72
- 4.8
- 110 PRINT “This is 20 PITCH”
- 4.8
- 120 VDU 1,27,1,69 :REM reset printer
- 4.8
- 130 VDU 3
- 4.8
- 140 END
- 4.8
- A Kitchenside, Weybridge
- 4.8
- • Big memory tips − As a footnote to my own article in last month’s
- Archive on making best use of machines with more than 1M memory, I’d
- like to add one more tip. I was reminded by a review of Protext, which
- noted that the current version does not multi-task, that my eleventh tip
- might have been, “boycott non multi-tasking packages”. Since, with 1M,
- you couldn’t really multi-task two significant applications, this was
- not a problem. Now, it’s a real pain in the neck not to be able to have
- several applications with simultaneously active windows, much of the
- power and ease-of-use of RISC-OS is being un-used and it’s annoying
- knowing that 3M of your upgrade is being wasted!
- 4.8
- So, unless there’s a really good reason such as a time-critical sound
- sampler or video screen grabber, I suggest that we boycott such
- packages. Then, software producers would have to bring them up to date
- and not try to palm us off with “Arthur programs with !Run and !Boot
- files”. In an ideal world, software sellers would refuse to stock them
- but at least they could be marked as such, perhaps indicating their
- antiquity by listing them in a suitable script? Stuart Bell, Brighton.
- 4.8
- • C book − I was recommended a good C book which I used on a C short
- course I attended: The Waite Group’s “New C Primer Plus”, First Edition
- 1990, editor Howard W Sams & Co, ISBN 0−672−22687−1. It covers ANSI C,
- UNIX, Microsoft C and Turbo C. S. Stel, Netherlands.
- 4.8
- • ChangeFSI update − A new version of ChangeFSI v0.79 is available from
- Acorn Direct for £19.95. This will handle more image formats than would
- v0.69: Degas PI1, PI2 & PI3, !Translator Clear, MacPaint 579x720x1 bit/
- pixel, ZSoft .PCX, Windows3 .BMP, Pineapple 16 bit/pixel, UNIX rle, PC
- TGA. Unfortunately it will not run from the desktop under !ChangeFSI
- (Shareware Disc 21) as is. This is because version 0.79 is 94 Kbytes
- long, compared with 74K for v0.69. The solution is to edit the !Run file
- of !ChangeFSI and increase the WimpSlot from 128K to 160K. All is then
- well. A Quayle, Chester
- 4.8
- • C txt library − This idea was inspired by the article ‘Introduction to
- C’ – Part 5, in Archive 3.6. This gave a complete RISC-OS application
- using the libraries supplied with Release 3 of Acorn C. In particular,
- it used the ‘txt’ library to provide a window to display text generated
- by the sample program. This requires a minimum of effort by the
- programmer since the library looks after most of the problems.
- 4.8
- Although it works as described, it has two major disadvantages. The
- first is the slow speed during text generation. The second is the
- operation of the window controls. In particular, the cursor control keys
- cannot be used to move the text through the window, the close icon has
- no effect and the vertical scroll bars can only be dragged. Here are
- some techniques which overcome these problems.
- 4.8
- Improved text generation speed turns out to be a very simple modifi
- cation since the cause of the slow operation is the redrawing of the
- window for every item added to the text buffer using, for example, the
- txt_insertstring function. Two extra lines are required; the first turns
- off the display updates when text generation starts and the second turns
- it back on when the operation is complete. The lines shown below should
- be inserted immediately after the visdelay_begin() statement and
- immediately before the visdelay_ end() statement in the original program
- function sysvars_to_text().
- 4.8
- /* turn off display update */
- 4.8
- txt_setcharoptions(t, txt_DISPLAY, FALSE);
- 4.8
-
- 4.8
- /* turn on display update */
- 4.8
- txt_setcharoptions(t, txt_DISPLAY, TRUE);
- 4.8
- Improving text window control requires rather more code but again the
- principle is fairly straightforward. Firstly an event handler has to be
- registered for the text window following its successful creation by the
- txt_new() function using the following statement:
- 4.8
- /* register the text window event handler */
- 4.8
- txt_eventhandler(t, user_txevent, NULL);
- 4.8
- This registers the function user_txevent which will be called to process
- text window events.
- 4.8
- The function itself has to process all the events which the user
- requires. A sample function is given below which is commented to show
- which events are being processed. The keyboard key macro definitions
- given in ‘akbd.h’ are used for consistency but, in addition, the ‘Home’
- key must also be defined using a macro as this is omitted from ‘akbd.h’.
- The actual key values required are defined in the PRM, page 1198 and the
- macro definitions are given in file ‘akbd.h’. Note, however, that the
- definitions given for both akbd_ PageUpK and akbd_PageDownK are wrong so
- I have not used these but used their correct definition in the following
- code. The value txt_ EXTRACODE is added to the key value to represent
- the equivalent window operation. A full list of these is given on page
- 325 of the ANSI C Release 3.
- 4.8
-
- 4.8
- #include “akbd.h”
- 4.8
-
- 4.8
- #define HOME (30)
- 4.8
-
- 4.8
- /***********************************
- 4.8
- user_txevent text window event handler
- 4.8
- t text object
- 4.8
- h event handle
- 4.8
- ***********************************/
- 4.8
- void user_txevent(txt t, void *h)
- 4.8
- {lines ; /* number of lines in window */
- 4.8
-
- 4.8
- h = h;
- 4.8
- while (txt_queue(t) > 0)
- 4.8
- {number of lines visible in window */
- 4.8
- lines = txt_visiblelinecount(t);
- 4.8
-
- 4.8
- /* process the next user event code */
- 4.8
- switch (txt_get(t))
- 4.8
- {+ akbd_Fn+127:
- 4.8
- /* close window icon */
- 4.8
- txt_hide(t);
- 4.8
- break;
- 4.8
-
- 4.8
- case akbd_UpK:
- 4.8
- case txt_EXTRACODE + akbd_UpK:
- 4.8
- case txt_EXTRACODE + akbd_Sh + akbd_Ctl + akbd_UpK:
- 4.8
- /* scroll up one line */
- 4.8
- txt_movevertical(t, –1, TRUE);
- 4.8
- break;
- 4.8
-
- 4.8
- case akbd_DownK:
- 4.8
- case txt_EXTRACODE + akbd_DownK:
- 4.8
- case txt_EXTRACODE + akbd_Sh + akbd_Ctl + akbd_DownK:
- 4.8
- /* scroll down one line */
- 4.8
- txt_movevertical(t, 1, TRUE);
- 4.8
- break;
- 4.8
-
- 4.8
- case akbd_Sh + akbd_UpK:
- 4.8
- case txt_EXTRACODE + akbd_Sh + akbd_UpK:
- 4.8
- /* scroll up one page */
- 4.8
- txt_movevertical(t, -lines, FALSE);
- 4.8
- break;
- 4.8
- case akbd_Sh + akbd_DownK:
- 4.8
- case txt_EXTRACODE + akbd_Sh + akbd_DownK:
- 4.8
- /* scroll down one page */
- 4.8
- txt_movevertical(t, lines, FALSE);
- 4.8
- break;
- 4.8
-
- 4.8
- case akbd_Ctl + akbd_UpK:
- 4.8
- case HOME:
- 4.8
- /* move to start of text */
- 4.8
- txt_setdot(t, 0);
- 4.8
- break;
- 4.8
-
- 4.8
- case akbd_Ctl + akbd_DownK:
- 4.8
- case akbd_Sh + akbd_CopyK:
- 4.8
- /* move to end of text */
- 4.8
- txt_setdot(t, txt_size(t));
- 4.8
- break;
- 4.8
-
- 4.8
- default:
- 4.8
- break;
- 4.8
- }
- 4.8
- }
- 4.8
- return;
- 4.8
- }
- 4.8
- David Scott, Stockport
- 4.8
- • Connection problems − If you are having connection problems with RS423
- connectors, or video or printer − or a dongle, it may be because the
- plugs are not ‘going home’ properly into the sockets on the back of the
- computer. I have noticed this particularly on A540’s, but it could also
- occur on other Archimedes computers. This may be because the fixing
- pillars either side of the socket are too high. The solution it to take
- a pair of pliers (or a box spanner if you have a suitable sized one) and
- remove each of the pillars in turn, take off the washer and screw the
- pillar back in. That extra millimetre can make all the difference.
- 4.8
- • CPC monitor − When my multisync died on me suddenly and I was forced
- to make do with what I had − a well worn Amstrad CPC green screen
- monitor. In practice it was fairly easy to connect the six-pin CPC
- connector to the nine-pin connector on the A3000:
- 4.8
- Archimedes CPC
- 4.8
- 1, 2 & 3 − 6
- 4.8
- 6, 7, 8 & 9 − 5
- 4.8
- 5 − 4
- 4.8
- Naturally, it is impossible to use the multisync modes but it certainly
- is almost as sharp a picture on the tube as on my multisync and much
- cheaper. If your main interest is games I wouldn’t recommend it but for
- most business uses it is perfectly all right. I guess you could get a
- second hand green CPC monitor for next to nothing in the UK as many
- owners have exchanged them for the new CPC monitors. Ask your local
- dealer! A spare monitor could come in handy any day! Tord Eriksson,
- Sweden.
- 4.8
- • !Edit − For what seems like an eternity I have been wrestling with the
- problem of importing text from a wordprocessor (in my case View). What I
- wanted to do was free the text from newline characters in order that, on
- loading it into Ovation, it could be formatted to new column width, in
- whatever point size, without the newline control code producing extra
- linefeeds. At the same time, it should retain the carriage returns
- marking the paragraphs and multi-line spacing. This way I did not lose
- all the style. What follows is how I do it . It might seem obvious but
- it could help someone who is as thick as me. If I have missed the point
- would some kind person tell me before I go mad.
- 4.8
- After loading your text into !Edit, go through the text ensuring that
- there are double returns at the end of each paragraph and on multiple
- line text like program listings or poetry.
- 4.8
- My technique is firstly to change double returns into something which is
- unlikely to appear elsewhere in the text, thus:
- 4.8
- Press <F4> to select Find
- 4.8
- In the Find dialogue box enter \n\n <return>
- 4.8
- In the Replace dialogue box enter ZCZC<return>
- 4.8
- Click on the Magic Character box
- 4.8
- Click on the Go box
- 4.8
- Click on End of File Replace
- 4.8
- Click on Stop
- 4.8
- Press <ctrl-up> to move the cursor to the top
- 4.8
- Now, to replace the single returns:
- 4.8
- Press <F4> to select Find
- 4.8
- In the Find dialogue box enter \n <return>
- 4.8
- In the Replace dialogue box press <space>
- 4.8
- Click on Go
- 4.8
- Click on End of File Replace
- 4.8
- Click on Stop
- 4.8
- Press <ctrl-up>
- 4.8
- Then, to restore the double returns to single ones:
- 4.8
- Press <F4> to select Find
- 4.8
- In the Find dialogue box enter ZCZC<return>
- 4.8
- In the Replace dialogue box enter \n <return>
- 4.8
- Click on Go
- 4.8
- Click on End of File replace
- 4.8
- Click on Stop
- 4.8
- You should have your text with the paragraph and multi-line spacing
- intact. (Simplified from a hint sent in by R Follett, Winnersh, Berks.)
- 4.8
- • Improving sound quality − Further to the comments by Jeremy Mears
- (Archive 4.7 p 21) there is no need, on the A3000, to actually solder to
- the motherboard. You can make contact to the appropriate resistors using
- micro test clips (Tandy − £1.50 for four). This would, I suppose, still
- invalidate the warranty but is less obvious than blobs of solder on the
- p.c.b.! To get access to the resistors, you have to remove the disc
- drive by unscrewing it from underneath. R86 is under the keyboard side
- of the drive whereas R99 is under the middle of the drive. Pin 1 of the
- expansion port is the furthest right (looking from the keyboard side of
- the computer). Gerald Williams, Aldershot.
- 4.8
- • Multiple height and width text printing − I know that the emphasis
- these days is on programs which multi-task and use mode 12 on the
- desktop but not every program is suitable for this and some of these
- programs require larger than usual height characters.
- 4.8
- I am (slowly) developing a word game for the Archimedes, from one I
- wrote last year on my Model B. The “B” version uses mode 2, with double
- height routines written in machine code for speed. The original version
- of this code was quite “illegal” and would not work on a Master but it
- was fast! With it, I could also have text printed 3 or even 4 times
- normal height just as quickly. However, I am new to the Archimedes and
- ARM code is currently beyond me, so after trying various routines in
- BASIC I came across VDU23,17,7. This gives characters at any height and
- any width and is very fast! I can even get half width which gives the
- impression of mode 1 characters in mode 2. Also, it works in most Screen
- modes (except 3, 6 & 7).
- 4.8
- I’ve put together a short routine which demonstrates how easy and fast
- this routine is. To use it, all you have to do is append the PROCedure
- to your program and call it with the colour you wish it to appear in,
- the X & Y positions, the height and width of the characters and the
- Text$ − the routine will do the rest! One point to bear in mind,
- however, is that text is printed using the graphic cursor, i.e. under
- VDU 5 and MOVE or PLOT, rather than the text cursor and VDU 31, X%,Y%.
- 4.8
- Even though this demonstration program is about 20 lines long, the only
- bits you need are in PROCtext(colour, X_co_ord, Y_co_ord, Height, Width,
- Text$). The function FNvdu simply returns the text width of the screen
- mode window in use and this is used to check if lines are too long in
- the first line of PROCtext. The second line in PROCtext is personal as I
- like being able to centralise text without effort! To do so, just set X%
- to -1. The %110 sets bits 1 and 2 so that both characters and spacing
- are altered at the same time. %100 sets spacing, while %010 will alter
- just character sizes. It is also possible to use 0.5 as Height or Width
- but that works better in “chunky” modes, like 2 rather than 12. When the
- width is set to an odd number, the “auto-centralising” is sometimes a
- little off so you may prefer to set up the X co-ord manually.
- 4.8
- REM >$.Height/Wid.!RunImage
- 4.8
- :
- 4.8
- DIM block% 12, output% 12
- 4.8
- MODE12:COLOUR3
- 4.8
- :
- 4.8
- PROCtext(1,-1,1,2,3,“Multi Height & Width!”)
- 4.8
- PROCtext(2,-1,4,2,1,“Double Height, Normal Width”)
- 4.8
- PROCtext(3,-1,7,1,2,“Normal Height, Double Width”)
- 4.8
- PROCtext(4,-1,10,3,3,“3 * 3 Format”)
- 4.8
- PROCtext(5,-1,15,4,1,“Ridiculous! 4 X 1 !!”)
- 4.8
- PROCtext(6,-1,20,1,1,“You should reset the height & width
- 4.8
- before finishing”)
- 4.8
- PROCtext(6,-1,21,1,1,“but as it stands the PROCedure will
- 4.8
- do this anyway”)
- 4.8
- END
- 4.8
- :
- 4.8
- DEFPROCtext(C%,X%,Y%,H,W,T$)
- 4.8
- F%=FNvdu
- 4.8
- IF F%-(LENT$*W)<=0 THEN ERROR 300,“Line too long”
- 4.8
- GCOL C%
- 4.8
- Y%=1000-(Y%*32)
- 4.8
- IF X%=-1 THEN X%=(F%-LENT$*2)/(W*2)
- 4.8
- IF W=1 THEN X%=(F%-LENT$)/4
- 4.8
- X%=X%*32
- 4.8
- VDU 23,17,7,%110,W*8;H*8;0;
- 4.8
- VDU 5,25,4,X%;Y%;
- 4.8
- PRINT T$
- 4.8
- VDU 4,23,17,7,%110,8;8;0;
- 4.8
- ENDPROC
- 4.8
- :
- 4.8
- DEF FNvdu
- 4.8
- !block%=256
- 4.8
- block%!4=-1
- 4.8
- SYS“OS_ReadVduVariables”,block%,
- 4.8
- output%
- 4.8
- =!output%
- 4.8
- • Off screen desktop windows − Normally, the filer and switcher windows
- are forced to stay within the confines of the screen but, by altering
- their template files, it is possible to make them move ‘off screen’ and
- thus help to reduce window ‘clutter’.
- 4.8
- To do this, you have to copy the window templates from the DeskFS to a
- directory called Templates. First, create a directory called Templates
- in the root directory of your harddisc or ‘workdisc’ and then type the
- following:
- 4.8
- *deskfs
- 4.8
- *copy templates.filer scsifs::scsidisc4.$.templates.filer
- 4.8
- *copy templates.switcher scsifs::scsidisc4.$.templates.filer
- 4.8
- (You can also copy netfiler, palette and wimp windows across if
- required.)
- 4.8
- Load the window template data into !FormEd (Shareware Disc 20) and set
- the ‘no bounds’ option for each window. Then, edit your disc !boot file
- to include the following line:
- 4.8
- Set Wimp$Path scsifs::scsidisc4.
- 4.8
- (or whatever your system is!) Don’t forget the full stop at the end.
- This points Wimp$Path in the direction of the updated windows.
- 4.8
- Finally re-boot your machine to see the result! M Roscoe, Ealing
- 4.8
- • PrinterDM with the Star LC24−10 − I was interested to see the note on
- !PrinterDM and the LC24-10 in March’s edition of Archive. May I draw
- your attention to the “Hint and Tip” which I had published in the March
- edition of Risc User on the same subject but concerning a different
- problem. I was initially disappointed in the results I obtained with
- Impression Junior (and from the Ovation test disc and, to a lesser
- extent, !Draw printouts). This was due to some lines of text having a
- marked “slewed” effect. After speaking to Star, and much sleuthing, I
- tracked down the problem to the very same line in the PrData file of
- !PrinterDM (version 1.12). There is apparently some incompatibility
- between the Star and the Epson LQ800. The former does not like the “zero
- absolute tab” command used to obtain the CR without LF. The solution was
- to substitute the commands used in the FX80 module, although modified to
- use the correct line feed command for 24 pin printers. With my version
- of !PrinterDM I have not experienced any squashed text with the 24/180
- inch feed (could the writer have been in IBM mode where the command
- gives n/216 inches rather than n/180 inches?) but the bigger feed
- suggested in March’s tip could equally well be used. The modified line
- is as follows:
- 4.8
- line_epilogue “<27>A<0><13><27>2<27>J<24>”
- 4.8
- I’m surprised that this matter has not previously been commented on,
- especially as I think it also applies to the XB24-10. A.F. Taylor,
- Poole
- 4.8
- • Quattro to Schema transfer − To move data files from Quattro, first
- save the file with a WKI extension. Then you can use Schema’s !sch123 to
- translate the file into Schema format. This method leaves all sorts of
- spurious bits and pieces which have to be edited out by hand but it does
- work. M Green, Devon
- 4.8
- • Quitting First Word Plus − If you quit First Word Plus (release 2)
- from the task manager while a text file is loaded, you will be thrown
- out of the desktop. If other applications are running that may object
- e.g. Draw, Paint, etc, they will announce what is about to happen and
- give you a chance to prevent it. Otherwise you will lose any files that
- you may have been working on in First Word Plus. R Bunnett,
- Swanley
- 4.8
- • Reading disc names − For those software writers who need to check that
- the user has inserted an appropriate disc in the disc drive the
- following function returns the name if the disc currently inserted:
- 4.8
- DIM block% 5
- 4.8
- :
- 4.8
- DEF FNdiscname
- 4.8
- SYS “OS_GBPB”,5,,block%
- 4.8
- ?(block%+?block% +1)=13
- 4.8
- =$(block%+1)
- 4.8
- M Sawle, Hampshire
- 4.8
- • !Schema VAT rate − New spreadsheets are created with various user
- names available, one of which is “Vat”. To change this from 0.15 to
- 0.175, look in the !Schema directory and then in the Menu directory and
- you should find a file called StartUp. This has a write-lock on it so
- you will have to use ‘Access’ off the filer menu to enable it to be
- changed. At the end of this file are a number of lines that start with
- ‘putusn’, the first of which is the Vat rate which simply needs to be
- changed before the file is again saved and the write-lock access
- restored. Ian Hamilton, Harrow.
- 4.8
- • Spaced filenames − If you want a <space> in a disc or file name, use a
- hard space. This is available by pressing either <alt><1><6><0> or
- <alt><space>. You should note that if you do use it then you can’t use
- the copy key on a catalogue because the Archimedes thinks that the
- character is a normal space (which is illegal in a filename). E Hughes,
- Derbyshire
- 4.8
- • Twin World cheats − The file SavedGame can be edited using !Edit to
- cheat. Byte values of interest include:
- 4.8
- Byte 1 = Level (Maximum = 22 = &16)
- 4.8
- Byte 4 = Red Spells (Maximum 99 = &63)
- 4.8
- Byte 5 = Blue Spells (Maximum 99 = &63)
- 4.8
- Byte 6 = Green Spells (Maximum 99 = &63)
- 4.8
- Bytes 8-11 = Score, low byte first. (Maximum = 999999 = &F423F )
- 4.8
- Byte 12 = Lives (Maximum = 9 or 10 = &9 or &0A)
- 4.8
- Remember all value are in hex, so use the magic character option in
- !Edit’s Find. Stuart Turgis
- 4.8
- • TwinWorld hints
- 4.8
- − Owls in the forest can be killed by jumping up and firing.
- 4.8
- − Similarly, on some occasions you will have to jump, but fire on the
- way down to hit denizens close to you.
- 4.8
- − Jump between worlds whenever possible − if you loose a life, you’re
- taken back to the last time you changed worlds.
- 4.8
- − Stamping your feet can reveal objects − either treasure or keys.
- 4.8
- − Beware of calling the genie when you are already carrying two other
- sorts of objects (remember the horn is one), because you won’t be able
- to buy an object which you don’t already hold.
- 4.8
- − Beware when shooting the three-headed dragon. If you don’t shoot the
- head furthest away from you, it flies away from you and fires an almost
- continuous salvo.
- 4.8
- − Watch out for extended jump − you can sometimes use it when you don’t
- realise − on some screens it’s essential and you may only have a limited
- amount.
- 4.8
- − Watch out for the parachute − in the last few levels I found I
- couldn’t get rid of it and it limited my objects to just two types.
- 4.8
- − When firing at the bird − if you duck, it flies lower to avoid your
- fire. Stand until the bird is fairly close, then crouch and fire.
- 4.8
- − When the giant clam fires at you, or the Big eye, if you run so the
- ‘bullet’ is off the screen it will disappear.
- 4.8
- Impression
- 4.8
- Hints & Tips
- 4.8
- Bruce Goatly (BG), who is busy writing a book about using Impression,
- very kindly sent us some hints & tips (in return for permission to use
- our H&T in his book!). Most of the rest of the H&T are from the editor’s
- experiences with the unreleased version 2.09. (Version 2.10 is not ready
- for release so 2.05 is still the latest officially available version.)
- 4.8
- • Abbreviation expansion − Use it to correct common spelling errors or
- to enforce house style (I often type ‘ans’ for ‘and’ and ‘thw’ for
- ‘the’, and the house style for my book is ‘disk’ whereas I almost always
- spell it ‘disc’). BG.
- 4.8
- • Date and time format − As I continually forget what day it is, I use
- the Insert date option quite a lot. If you want to change the format of
- the date (the default is in the form 6th April 1991), load the !Run file
- into Edit and alter the definition of the variable Impression$DateFormat
- (see pp. 337-339 of the User Guide, on using system variables).
- Similarly, you can alter the time format by editing
- Impression$TimeFormat. BG.
- 4.8
- • Dongle connection problems − If you are having problems with a dongle
- that keeps saying it is not present and you find that you need to wiggle
- it (just a little bit!) to recognise its presence, go back and read the
- hint above about ‘Connection problems’. Alternatively, CC themselves
- offer a hint about it. They say that it is important to quit properly
- from Impression and not just do a <ctrl-break>, otherwise the dongle
- might need to be left for a couple of hours for a capacitor to discharge
- before Impression can be loaded again.
- 4.8
- • Line spacing and font changes − If a line in the middle of a paragraph
- starts with a different font from the lines around it, the line spacing
- may be upset for that one line because of the way Impression does its
- calculations. The way round it is to put the cursor at the start of the
- offending line, cancel the font change at that point and insert a ‘null’
- character (such as Alt-131). This will be invisible but will correct the
- line spacing. BG.
- 4.8
- • Loading text files − If you want to load a text file into Impression,
- there is no need to create a new document first − just drag the Edit
- file onto the Impression icon and it will set up an untitled document
- and load the text into a null frame.
- 4.8
- • Marking a single character − If you are doing DTP in a lower resolu
- tion screen mode, you may be finding it difficult to use the mouse to
- drag-mark a single character e.g. the ‘l’ in ‘will’. One way of doing it
- is to move the cursor between two of the characters, click <select> but
- firmly hold the mouse in place. Then you use the cursor left or right,
- as appropriate, to move the cursor to the other side of the character to
- be marked and finally press <adjust>. George Foot, Oxted.
- 4.8
- My method of doing any of this kind of detailed work is to have two
- windows open on the same document − which is extremely easy to do
- (another advantage over PageMaker!) − one shows the full page and one
- just an enlarged section of the text. Then you can flick backwards and
- forwards between the two views enlarging and contracting the windows or
- simply pushing them to the back when they are not wanted.
- 4.8
- (However, have you noticed that Impression sometimes insists on going
- back to the beginning of the document when you expand and contract the
- window using the size switch icon in the top right hand corner of the
- window? Has anyone worked out why it happens and, more importantly, how
- to stop it?)
- 4.8
- • Special characters − The list in Appendix 5 of the Impression II
- manual gives a printout of all the characters. This is useful, but there
- is some variation from one typeface to another, so it would be useful to
- have an Impression file of it so that you could print it out in your
- particular typeface. I’ll put a file of it on the monthly program disc,
- but if you want to do it yourself, you can run the following program and
- put the text into a multi-column Impression document.
- 4.8
- 10 REM > CHARLISTER
- 4.8
- 20 *SPOOL CHARS
- 4.8
- 30 @%=2
- 4.8
- 40 FOR N% = 32 TO 255
- 4.8
- 50 PRINT N%;CHR$(9);
- 4.8
- “{”“heading”“on }{” ;CHR$(N%); “}”
- 4.8
- 60 NEXT
- 4.8
- 70 *SPOOL
- 4.8
- • Spell-checking − Not really a hint, but I was using the spelling
- checker and it offered me the word “faltness” and told me that
- “flatness” was wrongly spelled. Also, while spell-checking, someone had
- written “Beebugs’ policy”. The spelling checker knows Beebug but can you
- guess what it offered me as an alternative for the accidental plural?
- Yes, that’s right, “Bedbugs”! On the same theme, I spell-checked my
- Factfile and came up with Motley Electronics, Mike Leecher of EMU Ltd,
- ARM3’s from Aloof One and IDLE drives from Ian Copycats. Then I tried
- some of our contributors and found Brain Cowman, Dim Parkland and last,
- but not least, Pall Beggarly.
- 4.8
- • Tickets please! − (The following saga gives, firstly, an unnecessarily
- long method of doing a job but one which illustrates techniques which
- might prove useful in other circumstances. It is followed by the easier,
- smarter method!) I wanted to make some numbered tickets at A6 size so I
- made up an A4 page with four copies of the ticket. I used a two column
- master page so that I could just take a copy of the text on the page and
- paste it 14 times to make my 60 tickets. Near the bottom of each ticket,
- it said, “Ticket number: ” with an appropriate blank space. Then I
- created four guide frames on the master page at about the right place to
- put in the ticket numbers and inserted four new frames on each page. I
- then went through linking all the frames together. To create the text
- for the numbers, I used PipeDream using the “row” command and copying it
- down 60 rows. I then “saved” this in tab format straight into the first
- ticket number frame and, instantly, all the tickets were numbered.
- Brilliant! The only real hassle was lining up the ticket number boxes
- with the words on the ticket. The problem is that although you can have
- both the text and the master page on screen at the same time and at the
- same magnification (which helps), the main page is not updated until the
- master page is closed so I changed the “preferences” to make the master
- page come up at the right magnification.
- 4.8
- (A similar technique of linked frames is used for the running heads on
- the magazine − i.e. the articles’ names at top outside corners of the
- pages. The dummy Archive, before articles are inserted, has a whole
- string of 60 “X”s, one on each page, alternately left and right aligned.
- Then, when an article has been inserted, the running heads are altered
- using selective search and replace to change, for example, “X” into
- “Hints & Tips”. This is easier than using copy and paste because it
- preserves the left and right alignment. But I digress... let me get back
- to the tickets...)
- 4.8
- Then I suddenly realised the easy way of doing it.... Create the ticket
- at full A4 size on the master page using “Ticket number: ” and then
- inserting the page number. (Use <menu> − Misc − Insert − Current page
- number − Numeric.) Then, all you do is to add 59 pages (click on “Insert
- new page” with <adjust>, not <select> so that the menu option stays on
- the screen) and use “Fit lots” on the “Print” dialogue box reducing the
- scale to 50%. If you find that it still says, “Fit lots (1)” at 50% and
- you have to go down to about 48% before it goes to (4), click on
- “Setup...” and select the option to “Ignore page boundary”. If you don’t
- do this but print out at 48%, you will find that the margins are
- unequal. This is a much quicker way of doing it than the previous method
- and also gives the possibility of deciding that you want the tickets
- smaller after all so you just reduce the scale and, perhaps, change to
- sideways printing.
- 4.8
- • Widows & orphans − This is the technical term for where you get a
- paragraph split so that a single line is on one page (or column) and the
- rest is on the previous or next. If the first line is split off from the
- rest, the solution is fairly obvious − use <ctrl-G> at the beginning of
- the paragraph to push the line onto the next column. The odd line at the
- end of a paragraph is less easy. If the text is left justified, you can
- again use <ctrl-G> to push one more line to the next column to join the
- lonely orphan. However, if you subsequently edit the paragraph so that
- the layout of the lines changes, you have to edit out the <ctrl-G>.
- Also, this doesn’t work at all if you are using full justification
- because the <ctrl-G> causes the justification on the last line of the
- column to be lost and it looks like the end of a paragraph without a
- full stop. The only solution I can find is to create a new frame with
- <ctrl-I> and lay it over the last line of the column. This forces that
- line over to the next column without losing the justification.
- 4.8
- SCSI Hints & Tips
- 4.8
- • Removable drive problems − We are beginning to understand more about
- the problems with removable drives. Let me explain... SCSI drives are
- intelligent and they keep their own record of any duff sectors. However,
- this record is not available to the user. If you tell the computer to
- “format” the disc, it deliberately ignores any sectors it already knows
- are duff. If you get a “soft error” i.e. where the data gets corrupted
- so that the CRC check shows up an error, reformatting will clear the
- problem. However, if the disc surface is actually damaged, it may be
- that reformatting clears the problem temporarily but, with time, the
- problem may reappear and you will get the dreaded “Disc error 10 at... ”
- or whatever. The solution to this is to use the *DEFECT command provided
- by RISC-OS. If you get an error, *VERIFY the disc, note the addresses
- which are thrown up as either suspect or actually having a disc error,
- say, 7CEC00, 7CEE00 and 7CF000 and then type in
- 4.8
- *DEFECT SCSI::5 7CEC00
- 4.8
- *DEFECT SCSI::5 7CEE00
- 4.8
- *DEFECT SCSI::5 7CF000
- 4.8
- where SCSI::5 is the drive definition. It is worth recording these
- addresses in case you need to format the disc again in the future. You
- then need to enter the *DEFECT commands again. If *DEFECT finds that you
- are trying to map out a sector that is allocated to a file or directory,
- it will tell you so, in which case, you will have to copy the file or
- directory and delete the one which it says is in the way.
- 4.8
- Obviously, it is better if you can avoid getting hard errors in the
- first place so, just as a reminder, (1) always dismount the drive
- properly before switching off the power and (2) keep your drive cool by
- not packing other hardware around it.
- 4.8
- • Removable drive problems (Part 2) − Surely there can’t be any MORE
- problems with the removable drives − they really won’t be worth selling.
- Yes, there are more problems but, yes, I still think they are worth
- selling. If you try to use the MR45’s or the Atomwide equivalent on an
- Acorn SCSI podule or on a TechnoSCSI (I have not tried any others), you
- will find that occasionally they just hang up − usually when copying a
- sequence of files. It is a timing problem which Acorn say they will look
- into but they are not too optimistic. They say that Syquest, who make
- the drive mechanisms, have interpreted the SCSI standards in a different
- way from other drive manufacturers. The Acorn engineers have tried to
- modify their software to accommodate Syquest’s idiosyncrasies but
- although they have managed to make a version of their software that will
- work when copying lots of files, they find that it does not format the
- cartridges properly! It is not beyond the bounds of possibility to get
- SCSI software to work on the Syquest drives − both Oak and Lingenuity
- have done it successfully but, as yet, there is no satisfactory way of
- running them on Acorn or TechnoSCSI cards.
- 4.8
- I should say to A540 owners, that, although I am using a Syquest
- removable drive on my A540, I am doing so on an Oak podule. I made the
- change (before I realised there was any problem) purely on the basis
- that (1) the Oak software is the easiest to use on the MR45’s because of
- the ease of dismounting and re-mounting discs and (2) it is the fastest
- that I have tried. (I have not yet tried the offerings from HCCS or The
- Serial Port but unless they have specifically tailored their software
- for the Syquest mechanisms, I doubt that they will work.)
- 4.8
- • SCSI land speed record − Oak are claiming an Archimedes drive speed
- record. Their 300M HS drive, on an A440 with a 20MHz ARM3, runs at 1939
- / 1761 / 1043 Kbytes/sec in modes 0, 15 and 21 respectively. Can anyone
- beat that? A
- 4.8
-
- Hints and Tips
- 4.9
- • Beware spaces − There is a problem with spaces at the end of OS
- variables:
- 4.9
- If you include in a !Run file code such as the following:
- 4.9
- Set ThisApp$Dir <Obey$Dir>
- 4.9
- Run <ThisApp$Dir>.!RunImage
- 4.9
- then beware that you don’t include a space at the end of the first line!
- If you do, the space will be included in the definition of ThisApp$Dir
- and the second line will cause a “Bad File Name” error. Hugh Eagle.
- 4.9
- • PC emulator with an ARM3 − The default boot-up process for the ARM3
- performs an RMClear command, killing all RAM resident modules including,
- in particular, the module that drives the ARM3. So, in order, to get the
- PC emulator to take advantage of the ARM3‘s extra speed you need to
- alter the line in !PC.Genboot.!Config immediately after the one that
- reads “Perform RMClear?” from “Y” to “N”! (Thanks to Martin Coulson of
- Atomwide for this advice.) Hugh Eagle
- 4.9
- • Printer tips − You can alter the halftone density by editing the
- PrData file within your printer driver (see Archive 4.6 for an example
- of how to find this). For instance, PrinterLJ has lines such as:
- 4.9
- pxres_halftone:300/8
- 4.9
- pyres_halftone:300/8
- 4.9
- so each halftone dot is actually formed of a matrix of 8x8 dots, giving
- a halftone density of 300/8=37.5 dpi. This gives a very coarse effect
- but can produce 65 different grey levels. Altering the lines to:
- 4.9
- pxres_halftone:300/6
- 4.9
- pyres_halftone:300/6
- 4.9
- gives “only” 37 grey levels and a dot pitch of 50 dpi. Experiment to see
- what suits your printer best.
- 4.9
- A word of caution. I used !Draw to produce some PCB artwork, printed it
- out using !PrinterLJ on a DeskJet Plus and sent it off... Disaster! The
- size was OK across the width but was 1.5% too small along the length of
- the paper, as was discovered when the finished circuit boards came back.
- I’d previously had no trouble using an Epson-compatible printer, so it
- may be something to do with the friction feed on the HP slipping, or
- perhaps a slightly thicker paper would have helped. Anyway, if your hard
- copy must be accurate, then check it! Jonathan Oakley, Cambridge.
- 4.9
- • Printing * command output − Ever since I got my LaserDirect I have
- been laboriously printing the results of *Status, *Dump, etc. by
- directing the output to a file and then printing the file (while
- bemoaning the loss of the <Ctrl-B>, etc. facility à la BBC). However, I
- have just realised that it is easier (and much more in keeping with
- Acorn’s RISC-OS standards, I am sure) to open a Task Window in !Edit,
- enter the * command (which puts its output in the window) and then print
- the contents of the window by “saving” to the printer driver icon. In
- other words, click <menu> on the !Edit icon on the icon bar and use
- Create − New Task window. This presents you with a new window with a *
- ready for a command. Type in the command whose output you want listing,
- say, *STATUS. When the listing has finished, click on the window with
- <menu> and go Edit − Save and drop the text file produced onto your
- printer icon. Easy! (Then close the window, answering ‘Yes’ to ‘Kill and
- close’.) Hugh Eagle
- 4.9
- • Printing via a RISC-OS printer driver from a BASIC program − Have you
- ever wondered why your computer has a button called “Print” that doesn’t
- seem to do anything of the sort?
- 4.9
- At last, applications seem to be appearing that recognise that pressing
- the <Print> key is rather an intuitive way of printing (Impression and
- Poster are two examples). Also, I have discovered that RISC-OS printer
- drivers are not nearly as fearsome as the PRM makes them seem and it is
- actually quite easy to incorporate into your own program’s printing
- routines which are activated by ... wait for it ... the <Print> key.
- Amazing!
- 4.9
- Take the Painting application from the original Arthurian Welcome disc,
- for instance. We still use this in my family because it is so simple,
- but it has always (incredibly) lacked a printing facility. To rectify
- this, proceed as follows:
- 4.9
- Put this line near the beginning of the program (e.g. immediately after
- PROCdesktop (at about line 200):
- 4.9
- PROCPrintSetup(110000)
- 4.9
- Note: 110,000 bytes is big enough to allow the program to run in mode
- 20. 55,000 would be enough for mode 12.
- 4.9
- Put this line in the WimpPoll loop (e.g. immediately after the ENDCASE
- statement at around line 400):
- 4.9
- IF INKEY-33 THEN PROCPrint(162,232,1274,972)
- 4.9
- Note: INKEY-33 is the crucial function that recognises whether the
- <Print> key is being pressed.
- 4.9
- Finally, put these procedures at the end of the program:
- 4.9
- DEF PROCPrintSetup(SpriteAreaSize%)
- 4.9
- DIM SpriteArea% SpriteAreaSize%
- 4.9
- !SpriteArea%=SpriteAreaSize%
- 4.9
- SpriteArea%!8=16
- 4.9
- SYS “OS_SpriteOp”,9+256,SpriteArea%
- 4.9
- ENDPROC
- 4.9
-
- 4.9
- DEF PROCPrint(X1%,Y1%,X2%,Y2%)
- 4.9
- SYS “Hourglass_On”
- 4.9
- PrintHandle%=OPENOUT(“printer:”)
- 4.9
- SYS “PDriver_SelectJob”,PrintHandle% ,0 TO Old%
- 4.9
- ON ERROR LOCAL PROCPrintError
- 4.9
-
- 4.9
- MOVE X1%,Y1%:MOVE X2%,Y2%
- 4.9
- SYS “OS_SpriteOp”,14+256, SpriteArea%,“TempSprite”,1 : REM Get sprite
- 4.9
-
- 4.9
- DIM RectBlock% 15,Transform% 15,PrintPosition% 7
- 4.9
- RectID%=1
- 4.9
- BackCol%=&FFFFFF00:REM set background colour to white
- 4.9
-
- 4.9
- REM X1%, Y1%, etc. are the screen coordinates of the area
- 4.9
- to be printed
- 4.9
- !RectBlock%=X1%:RectBlock%!4=Y1%
- 4.9
- RectBlock%!8=X2%:RectBlock%!12=Y2%
- 4.9
-
- 4.9
- REM No scaling or rotation required
- 4.9
- !Transform%=&10000:Transform%!4=0
- 4.9
- Transform%!8=0:Transform%!12=&10000
- 4.9
-
- 4.9
- REM Put the bottom LH corner 1.5“ REM from the left AND 5” from the
- 4.9
- REM bottom of the page
- 4.9
- !PrintPosition%=1.5*72000
- 4.9
- PrintPosition%!4=5*72000
- 4.9
-
- 4.9
- SYS “PDriver_GiveRectangle”,RectID%, RectBlock%,Transform%,
- PrintPosition%,BackCol%
- 4.9
- SYS “PDriver_DrawPage”,1,RectBlock%, 0,0 TO More%,,RectID%
- 4.9
- WHILE More%
- 4.9
- SYS “OS_SpriteOp”,34+256
- 4.9
- ,SpriteArea%,“TempSprite”
- 4.9
- ,X1%,Y1%,0
- 4.9
- SYS “PDriver_GetRectangle”,, RectBlock% TO More%,,RectID%
- 4.9
- ENDWHILE
- 4.9
- SYS “PDriver_EndJob”,PrintHandle%
- 4.9
- SYS “Hourglass_Smash”
- 4.9
- CLOSE#(PrintHandle%)
- 4.9
- ENDPROC
- 4.9
-
- 4.9
- DEF PROCPrintError
- 4.9
- SYS “PDriver_Abort”,PrintHandle%
- 4.9
- SYS “Hourglass_Smash”
- 4.9
- CLOSE#(PrintHandle%)
- 4.9
- ENDPROC
- 4.9
- Hugh Eagle
- 4.9
- • Running one application from inside another If you’ve ever been
- puzzled by odd behaviour when you try to run one application from inside
- another, the following advice from Mark Neves of Computer Concepts’
- Technical Support Department may help.
- 4.9
- My particular problem arose when I tried to make sure that a printer
- driver was loaded by running !PrinterXX from within application A’s !Run
- file. The result was that application A failed to run and when I quit
- !PrinterXX, an error was reported.
- 4.9
- The answer is that when you run a “sibling task” from another appli
- cation’s run file the sibling “takes over the current environment” until
- it terminates and only then does it return control to the parent task
- (in a manner analogous to a subroutine call).
- 4.9
- The solution is to use the command
- 4.9
- * Desktop <sibling task name>
- 4.9
- rather than *Run. Hugh Eagle
- 4.9
- • “Saving” data from one application to another − (This is another of
- those “obvious to those who know it” hints.) If you want to transfer
- data (e.g. text or a sprite or a drawn object) from one RISC-OS
- application to another you don’t have to save it on a disc from
- application A and then load it into application B; all you have to do is
- drag the icon from application A’s “Save” box (i.e. the window that
- appears when you choose a Save menu option) into application B’s window.
- 4.9
- This works with all well behaved (“RISC-OS compliant”) applications,
- e.g. !Edit, !Draw, Impression, !Paint, !Poster, etc. and generally works
- for either the whole contents of a window or for selected items. Hugh
- Eagle
- 4.9
- • Sprite plotting and colour translation − The ColourTrans section of
- the PRM (pages 1399 to 1424) includes references to a number of SWI’s
- (including, in particular, ColourTrans_SelectTable) which have to be
- called with R1 pointing to the “source palette”. Since, according to PRM
- pages 390−391, a sprite’s palette data starts 44 bytes after the
- beginning of the sprite, it seems clear that, in order to translate a
- sprite’s palette you simply call the ColourTrans SWI with
- SpritePointer%+44 in R1, doesn’t it? Wrong!!!
- 4.9
- In fact, the palette data in a sprite appears to include 8 bytes for
- each colour with the second 4 bytes duplicating the first 4 (does anyone
- know why this is?) whereas ColourTrans expects only 4 bytes per colour.
- 4.9
- So, before you can translate a sprite’s colours, you need to include
- some code on the following lines:−
- 4.9
- PaletteLength%=SpritePointer%!32−44
- 4.9
- IF PaletteLength%=0 THEN
- 4.9
- PalettePointer%=0
- 4.9
- ELSE
- 4.9
- FOR I%=0 TO PaletteLength%-8 STEP 8
- 4.9
- Palette%!(I%/2) = SpritePointer%!(I%+44)
- 4.9
- NEXT
- 4.9
- PalettePointer%=Palette%
- 4.9
- ENDIF
- 4.9
- Note: The palette data, if any, starts 44 bytes after the beginning of
- the sprite. SpritePointer%!32 contains the number of bytes from the
- beginning of the sprite to the start of the actual sprite pixel data. If
- this equals 44, there is no palette.
- 4.9
- The point of setting PalettePointer% to 0 if there is no palette data,
- is that if the sprite has no palette then, in many cases, (especially if
- the sprite is defined in a 256 colour mode) it makes sense to call
- ColourTrans with R1 set to 0 since ColourTrans will then translate the
- default palette for the sprite’s mode. However ...
- 4.9
- • Strange sprite colours − Ever since RISC-OS arrived, I’ve been puzzled
- by the odd colours which have appeared when some sprites have been
- plotted by various applications (including Impression, no less). I think
- that, at last, I’m beginning to understand why. Consider the following
- curious state of affairs:
- 4.9
- Palette details are an optional part of the sprite data format. A lot of
- sprites are created by !Paint. !Paint, by default, creates sprites
- without a palette (presumably on the assumption that, having been
- designed in the Desktop colour scheme, they will be used on the
- Desktop.)
- 4.9
- The PRM (page 1278) recommends that you should use the ColourTrans
- module for best results when plotting or printing a sprite. However,
- although ColourTrans knows how to translate from any given palette and
- from the default palette for any mode, it doesn’t seem to be equipped
- with any means of translating the standard desktop palette of a mode
- other than the current one.
- 4.9
- Therefore, the best that applications can do when faced with a palette-
- less sprite is to tell ColourTrans to assume that the sprite was defined
- in the default palette for its mode. The trouble with this is that it is
- about the worst possible thing that can be done with a sprite defined to
- be used on the Desktop since, for instance, colour 0 which is intended
- to be white, will be translated by ColourTrans, working from the default
- palette, into black! For example, even Impression reverses the colours
- of its standard document icon.
- 4.9
- So, what’s to be done? As far as I can tell:
- 4.9
- The best advice is to make sure that every sprite has a palette. If this
- isn’t possible then, for plotting sprites on the Desktop, use
- Wimp_ReadPixTrans if a sprite doesn’t have a palette (this is the
- routine that the Wimp manager uses for plotting sprites as icons and
- seems to produce quite acceptable results on the whole) and save
- ColourTrans calls for sprites that do have palettes. For example, follow
- the above palette conversion routine with code something like this:
- 4.9
- SYS “ColourTrans_SelectTable”,Mode%, PalettePointer%,-1,-1,ColTable%
- 4.9
- IF PaletteLength%<>0 THEN
- 4.9
- SYS “OS_SpriteOp”,52+512,Sprites% ,SpritePointer%,200,200,
- Mask%*8,Scale%,ColTable%
- 4.9
- ELSE
- 4.9
- IF NumberOfColoursInSprite%<63 THEN SYS “Wimp_ReadPixTrans”, 512,
- Sprites%,SpritePointer% ,,,,,ColTable%
- 4.9
- SYS “OS_SpriteOp”,52+512,Sprites%, SpritePointer%,200,200,
- 4.9
- Mask%*8,Scale%,ColTable%
- 4.9
- ENDIF
- 4.9
- If you’re plotting to a printer, “Wimp_ReadPixTrans” doesn’t help and I
- don’t think there is any straightforward, foolproof method. (It would be
- possible, I think, to create a block of palette data with the RGB values
- for the colours of the Desktop palette in the relevant mode and then
- feed this into ColourTrans, but this would be a rather tedious process.)
- Hugh Eagle
- 4.9
- Impression Hints and Tips
- 4.9
- • Adding fonts by using search & replace − As a mathematics and physics
- teacher, I use a lot of Greek letters and it is rather bothersome to
- have to work through all those menus to reach the effect “Greek” every
- time. Therefore, I use search & replace in a way which (at least in the
- Impression Junior handbook) is not documented:
- 4.9
- I type the text, using the Latin equivalents of the Greek letters (“g-
- Quant” instead of “g-Quant”) then, when I have finished the text, I use
- the following:
- 4.9
- Find: g-Quant
- 4.9
- Replace: g-Quant
- 4.9
- Impression does the rest. (Many thanks to Computer Concepts for the
- information!)
- 4.9
- By the way, if you wish to find out how all the other effects are saved
- in an Impression document, there is an easy way to find out: Just take a
- document with lots of effects and save only the text story (“with
- effects”). If you then drag the icon of the saved text story onto the
- !Edit icon, the text will appear with all the effects in plain language.
- Jochen Konietzko, Koeln, Germany
- 4.9
- (Wouldn’t it be easier to use <ctrl-F6> and edit the “Greek” style, go
- down to the bottom where it says “Key short-cut”, click in the box and
- press, say, <ctrl-shift-F9>, then OK it? Then when you want, say, “g-
- Quant”, you type “<ctrl-shift-F9>g<ctrl-shift-F9>-Quant”.... Oh, I see,
- Impression Junior doesn’t have styles. Oh well, nice try!)
- 4.9
- • Cutting invisible text − If you have more text in a frame than will
- fit, you get the little red arrow which indicates that some of the text
- is invisible. You could obviously create a new frame, click on the over-
- full frame and then click <adjust> on the new frame but there may still
- be too much for that frame. So, is there any way of marking the
- invisible text so that you can cut it or copy it? The answer is that you
- simply use <ctrl-down> to move the cursor to the (invisible) bottom of
- the text the click <adjust> to indicate the upper limit of the area to
- be marked. Ed.
- 4.9
- • Handy hint − If you use the ‘hand’ to move up or down through a long
- document, you are not limited in your movements to the visible page. In
- other words, if you keep moving the mouse up and up (by repeatedly
- lifting the mouse off the table) or down and down, you just keep moving
- through the document in the desired direction. (This is particularly
- useful if you are a trackerball user!) Ed.
- 4.9
- • Importing text files into Impression − In the new version of Impres
- sion which CC have just sent me (version 2.11), I have discovered an
- exciting new concept in the Archimedes world − “the Return Stripper”!!
- 4.9
- In the Extensions directory is a new loader module called “LoadReturn”
- which at last seems to deal satisfactorily with the importing of text
- files. Using this, I no longer have to load the file into !Edit then
- change linefeeds into carriage returns before importing. Nor do I have
- to suffer fixed line lengths in the imported text.
- 4.9
- However, I do have two quibbles (some people are never satisfied!):
- 4.9
- Double carriage returns are reduced to single returns, so spaces between
- paragraphs are eliminated (unless you change the style so that it leaves
- such a space − which I think is good practice. Ed). I feel it would be
- helpful to be able to set a “preference” to decide whether or not double
- returns are preserved.
- 4.9
- Importing a text file now involves a somewhat tiresome sequence of
- message windows whereby I am asked to accept or reject each of the
- available loader modules in turn. I feel it would be helpful to be able
- to use the “preference” facility either to define which loader is used
- for which filetype or, at the very least, to determine the order in
- which the various loader options are offered to me. Hugh Eagle.
- 4.9
- (All I did was to put the LoadReturn extension into the Auto directory
- in the Impression directory and now when I want files stripping, I use
- !Settype (Shareware 19 or 23) to change them to Acorn data file type
- (&FFD) and they are stripped automatically. Ed.)
- 4.9
- • Labels & Tickets − Another way of doing tickets and labels is to
- define a new master page which is the right size for what you want to
- create (pretty radical, eh?). “Fit lots” still works, giving you
- multiple tickets per sheet, but you’re not restricted to 1% size
- increments which can cause you to miss the boundaries on sticky labels,
- especially where there are three or four across the page width.
- (Brilliant! Why didn’t I think of that? Ed. − see below.)
- 4.9
- A similar technique works for cassette inlays. One way is to define a
- single master page 101mm deep and 288mm wide, divided into columns of
- 16, 12, 65, 65, 65 and 65mm; this format will fit two inlays to an A4
- page (assuming zero border width, which will vary between printers), but
- you need to fiddle around with !FontDraw and !Draw (Or use Draw1½ − see
- below. Ed) to get text on the spine of the cassette. Starting with a
- page 288mm deep and 101mm wide gives you the spine text a sensible way
- round, but the four “body” pages are then landscape, which you may not
- want.
- 4.9
- Another way is to split the inlay into two chapters; the spine has a
- 101mm wide, 28mm high master page, and the body pages are 65mm by 101mm,
- or vice versa if you want landscape. Then you need to do a bit of
- cutting and pasting by hand, as Impression won’t print individual pages
- sideways. This is the technique I ended up by using, printing at 141%
- then reducing the pasted-up result from two up on A3 back down by 70% to
- A4, thus enhancing the graphics halftones from 37.5 dpi to 53.6 dpi.
- I’ve included an example ... (Which we have put on the Monthly Program
- Disc. Ed) Jonathan Oakley, Cambridge.
- 4.9
- • Labels & tickets − Ed’s version − I have played a bit with Jonathan’s
- ideas and developed them a little. I tried to create some labels (like
- the ones on our Shareware Discs etc which come as 24 to an A4 page) and
- found that his method worked very well. I created a master page that was
- 70mm x 37.125mm (which is 210mm divided by 3 horizontally and 297mm
- divided by 8 vertically). I set a border 3mm wide on all four sides
- because the Laser Direct HiRes can print up to about 2.5mm of the edge
- of the page and I wanted to have a simple line border around my labels.
- I put all my text on the master page including a page number so that I
- could have a serial number on the labels. I then closed the master page
- and created another 23 pages for my document by using <menu> Edit −
- Insert new page. I clicked 22 times with <adjust> so that the menu
- stayed on screen and once with <select>. I then pressed <print> and
- clicked on “Fit lots” and then “Setup...” and then “Ignore page border”.
- The printout which appeared was almost right but was 1mm too far to the
- right, 1mm too low at the top and the last label was even lower. (Thinks
- hard.... tries various things and then....) The printout was slightly
- too long so I created a slightly shorter master page − 70mm x 37.11mm. I
- tried to see if there was any adjustment on the laser printer but
- couldn’t find any so I went to the (new, shorter) master page, clicked
- on the frame and pressed <ctrl-F10> to alter the frame. In the position
- section, I simply increased X from 5 to 6 and reduced Y from 5 to 4 in
- order to move the text on the page 1 mm right and 1 mm up. Bingo! Every
- border on every label was almost exactly 5mm.
- 4.9
- I also had a quick try with Jonathan’s cassette inlay printing and it is
- really very easy with his first method − I cheated though by using
- Draw1½ (Shareware 34). For the spine, all you do is create a new Draw1½
- document, type in the text you want, change it to whatever font you are
- using, press <menu> − Special − Text to path and then <menu> − Save −
- Selection and drop the Draw file produced into the relevant graphics
- frame in your Impression document. Then use <adjust> to drag the picture
- round until it is near enough at right angles to the rest of the text
- (having decided which way you want it to face) and finally press <ctrl-
- F11> (Alter graphic) and set the Angle to exactly 90° or 270°. (If you
- can remember which way round 90° or 270° puts it, then there’s no need
- to swing it round with <adjust>.) Here is a bit of text that I have just
- inserted. It must have taken me all of 45 seconds to create the frame,
- type in the text, convert it and add it in! (Software to enable me to do
- that on the Mac cost me hundreds of pounds a couple of years ago!)
- 4.9
- • “Running” an Impression document − In Alan Highet’s review of !Menon
- on Shareware 38 (Archive 4.8 page 48) he mentions that it did not work
- well with Impression documents since an attempt to “run” one of these
- caused a second copy of Impression to appear on the icon bar.
- 4.9
- I have observed a similar phenomenon in trying to create a front-end for
- Impression which, amongst other things, opens a template document chosen
- by the user. Simply *Running the document results in the loading of a
- new copy of Impression regardless of whether one is already running.
- 4.9
- So, why is it that double-clicking on an Impression document in a Filer
- window will load it into an existing copy of Impression whereas
- “running” it doesn’t?
- 4.9
- Mark Neves of Computer Concepts’ Technical Support Department has kindly
- explained why this happens and has pointed to a solution.
- 4.9
- The reason is that what happens when you double click on an icon in a
- Filer window is not simply that the document is “run”. First, the Filer
- broadcasts a Message_DataOpen message inviting other applications to
- open the document, and only if this message is returned unacknowledged
- does it instigate a *Run.
- 4.9
- The solution is a fairly simple program on the following lines:
- 4.9
- REM >!RunImage
- 4.9
- TaskName$=“RunImpDoc”
- 4.9
- :
- 4.9
- PROCSetUpWimp
- 4.9
- DocToOpen$=FNReadOSVarVal
- 4.9
- (“Doc$ToOpen”)
- 4.9
- PROCPollLoop
- 4.9
- SYS “Wimp_CloseDown”,Taskid% ,&4B534154
- 4.9
- IF NotAcknowledged% THEN OSCLI(“Run ”+DocToOpen$)
- 4.9
- END
- 4.9
- :
- 4.9
- DEF PROCPollLoop
- 4.9
- LOCAL mask%,quit%
- 4.9
- NotAcknowledged%=FALSE
- 4.9
- PROCSendDataOpenMessage
- 4.9
- mask%=0
- 4.9
- quit%=FALSE
- 4.9
- REPEAT
- 4.9
- SYS “Wimp_Poll”,mask%,block% TO reason%
- 4.9
- CASE reason% OF
- 4.9
- WHEN 17,18 : IF block%!16=4 THEN quit%=TRUE
- 4.9
- REM Another task (presumably
- 4.9
- REM Impression) has acknowledged
- 4.9
- REM our request to load a file.
- 4.9
- WHEN 19 : NotAcknowledged%=TRUE:quit%=TRUE
- 4.9
- REM Our request has not been acknowledged.
- 4.9
- ENDCASE
- 4.9
- UNTIL quit%
- 4.9
- ENDPROC
- 4.9
- :
- 4.9
- DEF PROCSendDataOpenMessage
- 4.9
- !block%=256
- 4.9
- block%!12=0:block%!16=5:block%!20=0
- 4.9
- block%!28=0:block%!32=0:block%!36=0
- 4.9
- block%!40=&2000
- 4.9
- $(block%+44)=DocToOpen$
- 4.9
- ?(block%+44+LEN(DocToOpen$))=0
- 4.9
- SYS “Wimp_SendMessage”,18,block%,0
- 4.9
- ENDPROC
- 4.9
- :
- 4.9
- DEF PROCSetUpWimp
- 4.9
- DIM block% &1000,errblk% 256
- 4.9
- REM Taskid%=FNWimpInit(200,TaskName$)
- 4.9
- SYS “Wimp_Initialise”,200, &4B534154,TaskName$ TO Version%,Taskid%
- 4.9
- ON ERROR PROCError(TaskName$)
- 4.9
- ENDPROC
- 4.9
- :
- 4.9
- DEF FNReadOSVarVal(varname$)
- 4.9
- LOCAL temp1%,temp2%,length%
- 4.9
- DIM temp1% 100,temp2% 100
- 4.9
- $temp2%=varname$
- 4.9
- SYS “OS_ReadVarVal”,temp2%,temp1%, 100,0,3 TO ,,length%
- 4.9
- temp1%?length%=13
- 4.9
- var$=$temp1%
- 4.9
- =var$
- 4.9
- :
- 4.9
- DEF PROCError(TaskName$)
- 4.9
- !errblk%=ERR
- 4.9
- $(errblk%+4)=REPORT$+“ at line ”+ STR$ERL
- 4.9
- errblk%?(4+LEN$(errblk%+4))=0
- 4.9
- SYS “Wimp_ReportError”,errblk%,1, TaskName$
- 4.9
- SYS “Wimp_CloseDown”,Taskid%, &4B534154:END
- 4.9
- ENDPROC
- 4.9
- To use this program, simply set up the OS variable Doc$ToOpen with the
- full pathname of the document and run the program. Hugh Eagle
- 4.9
- • Setting a style in an Impression frame − Question: how do I set up a
- blank frame containing a predetermined style (for instance, to hold the
- address of the person I am writing to, where I would like to use a
- different font from the one in the body of the letter)? If I put the
- cursor in the frame, then apply the style, then move the cursor
- elsewhere (or save and reload the document) before bringing it back to
- the address frame, and then start typing, the text comes up in the
- Basestyle.
- 4.9
- Answer: If after applying the style, I type anything (for instance a
- couple of carriage returns) in the address frame then the applied style
- seems to be remembered and the address frame works as intended.
- 4.9
- Caution: if I delete the entire contents of the frame the applied style
- is deleted too. So, if I want to blank the frame for reuse I have to
- remember to leave a carriage return or two to preserve the style. Hugh
- Eagle.
- 4.9
- • Typesetting − We said we would try to find companies willing to do
- typesetting from Impression output. Here are two that we have found. If
- you discover others, ask them to send us details of their services and
- we will publish them. We are particularly interested in those that will
- take Impression files as such rather than PostScript files on MS-DOS
- discs.
- 4.9
- The Type Station in Cardiff offers a full bureau service for bromide or
- film. You create PostScript files and either send them by post on an MS-
- DOS disc or send them c/o BT using a modem. For details, contact Elgan
- Davis on 0222−229977.
- 4.9
- Focus Print in Aberdeen can do bromides (PMT’s) from your Impression
- files. Phone Alexander Bisset on 0224−592571 ext 211 (or 0224−593956
- evenings). A
- 4.9
-
- Hints and Tips
- 4.10
- • *Count command − In Archive 4.6 p8 the hint about *Count, is only
- partly right. The *Count command only counts data. This means that
- directories indeed don’t contribute, but also that only the amount of
- data in a file is counted. However, all files must be an integer
- multiple of the block-size (1k for D and E format), and for short files
- this makes a huge difference. My 46Mb hard disc has about 8Mb difference
- between space used from *Free and from *Count for these reasons!
- 4.10
- One implication of this is that when you archive a large number of small
- files with !Spark you can save much more disc space than you might
- expect. One thing I would suggest for hard disc users is to copy the
- directory tree using *Copy :4.$ :0 T R, and then archive it, which will
- compress it down to almost nothing. Think of all the time you spend
- setting up the directory structure; this may be more important than
- losing files, most of which you will (should?), after all, have on
- floppies. As an added bonus this also gives you the location of all
- applications, as these are just directories. If (perish the thought) you
- have a disc crash, you can just drag the tree out of the archive and
- onto a new hard disc. Stephen Burke, Liverpool.
- 4.10
- • DataLoad problems? − The PRM says that if a DataLoad message isn’t
- acknowledged, the sending task should delete <Wimp$Scrap> and give an
- error. However, I think this is wrong. You aren’t guaranteed that the
- scrap file used is, in fact, <Wimp$Scrap>. One case where this must
- happen is with an application which can both load and save files of the
- same type at the same time; it must not use <Wimp$Scrap> for both, or it
- might get very confused! However, there might be other reasons. I
- therefore think you should remember the name of the file you saved, and
- delete that − you get told that it wasn’t a secure file, so this should
- be safe. Stephen Burke, Liverpool.
- 4.10
- • Hard Drive problems − BEWARE!!! If you have a fairly old computer − a
- 310 or a 440 or even a vintage 410/1 or if you are working in a dusty
- environment and you are putting in a new hard drive, check/replace the
- fan filter. Why? Well, drive suppliers tell us that on more than one
- occasion they have had a computer where the fan filter was blocked up
- with dust, the customer has installed a new drive and not changed the
- filter and, as a result of the lack of airflow, the drive has suffered a
- fatal head crash. So, you have been warned. (Fan filters should be
- available “from your local Acorn dealer” or they can be bought from
- N.C.S. as part of an “Annual Service Kit” − including a new pair of
- batteries − priced £3.)
- 4.10
- • How long is a line? − While editing an old program which I was
- converting from the BBC Master to run on the Archimedes, I came across
- some features of Basic line lengths which may be of interest. The
- program was originally written for the BBC-B with the longest possible
- lines to save space.
- 4.10
- On Page 16 of the ‘Basic User Guide’ issue 1 dated 1988, it says ‘A line
- of Basic can contain up to 238 characters...’ but on page 386 it says
- that ‘As in a Basic program, the length of a line is limited (by the
- Basic Editor) to 251 characters..’. This implies that the system has two
- different ideas of what the maximum line length should be, instead of
- one. Unfortunately, the one it uses seems to depend on what you are
- doing.
- 4.10
- My module ARMBasicEdit (version 1 21 August 87) allows the insertion of
- many more than 238 characters in a line. I can get up to 369 before
- there is a warning bell, but then neither <Escape> nor <Return> nor SAVE
- work until there are only the 251 characters left. Programs containing
- lines of length between 239 and 251 apparently run without problems.
- However, if you try editing the lines with Basic loaded, just using the
- Copy key, you find that there is a warning bell after 239 characters,
- (excluding the line number), not after 251.
- 4.10
- Programs with lines longer than 239 characters can be converted to ASCII
- using *SPOOL. However, when you attempt to read them back into a Basic
- program using *EXEC, the lines are truncated to 239, so that the program
- no longer runs. There is a warning bell but the *EXEC process does not
- stop, so not allowing me to find which lines are at fault. I find this
- very frustrating. The file Btest, on the monthly disc, is an example of
- such a program. The file ‘CHECK240’ is a small program which reads a
- file made using *SPOOL which cannot be successfully read back using
- *EXEC. It lists the line numbers which are too long, allowing me to edit
- them with the Basic Editor.
- 4.10
- CHAIN“Btest” to see that it runs. Then try
- 4.10
- *SPOOL TEMP
- 4.10
- LIST
- 4.10
- *SPOOL
- 4.10
- *EXEC TEMP
- 4.10
- CHAIN “CHECK240”
- 4.10
- and reply “TEMP” at the prompt. Kate Crennell, Didcot.
- 4.10
- • Printer drivers − Further to recent tips about altering the PrData
- file within the printer driver, you can also alter the title of your
- preferred driver and make it the default driver on loading. For example,
- the amendments to !PrinterDM in Archive 4.8 could be made to read “Star
- LC24-10” by altering the line before the line “printer number:2”. The
- default loading is achieved by amending the line “printer:01” to
- “printer:02”. This line is found towards the end of the data file
- immediately before the line “location:1”. Note that the printer number
- must be padded out with a zero (0). Pressing <select> after loading the
- driver will confirm if your amendments have been correctly made. Ted
- Lacey, Southampton.
- 4.10
- • Printing A5 on an A4 printer − If you ask the manufacturers, they say
- it is not possible to put A5 paper through either the Qume (300 d.p.i.)
- or the Canon (600 d.p.i.) Laser Directs − or the LBP4’s for that matter
- − but it is possible. All you need is a pile of A5 sheets of scrap paper
- sellotaped up into a solid block about ½“ thick (or ¾” thick for the
- Canons). You put them at the back of the A4 paper tray and put the A5
- paper, sideways, of course, at the front. The paper usually goes through
- OK but does occasionally stick. All you have to be careful of, presum
- ably, is that you don’t print on the lower half of the (A4) paper that
- is not actually there. Having said that, I have been using A5 paper on
- Qume’s, Canons and Mac Laserwriters for years and have occasionally left
- the “A5” tray in when printing A4 without any obvious damage to the
- printers.
- 4.10
- We can now get hold of spare paper trays for Qume (£66) and Canon LBP4
- (£57) and Canon LBP8 (£54)
- 4.10
- (A possible alternative to the paper is a block of wood the same size
- and thickness but I haven’t actually tried it.)
- 4.10
- • Psychedelic sound-to-light − Whilst playing a Tracker module, it is
- possible to obtain some interesting effects on your monitor by typing
- the following Basic command:
- 4.10
- SYS “OS_UpdateMEMC”,768,1792
- 4.10
- The screen can be returned to normal with either a MODE command or with:
- 4.10
- SYS “OS_UpdateMEMC”,1536,1792
- 4.10
- Rob Swain, Kent
- 4.10
- • Render Bender on SCSI hard disc drives revisited − In Archive 3.11 p6,
- Neil Berry explains how to use Render Bender on SCSI hard disc drives
- but leaves us with the problem of how to use *KILLADFS. This can be
- achieved by changing all references made to SWI ADFS_Drives (&40242) to
- SWI SCSI_Drives (&403C6). i.e.
- 4.10
- In the ‘Render’ Basic listing: change the SWI &40242 to &403C6 in line
- 15810
- 4.10
- In ‘Aniroute’ Basic listing: change the SWI &40242 to &403C6 in line
- 6670
- 4.10
- Atle Mjelde Bårdholt, Norway
- 4.10
- • Running one application inside another − The comment in Archive 4.9
- page 6 seems to need some amplification. As explained on page 11 of the
- May/June 1991 issue of “The Archimedean” from Computer Concepts, if you
- want to run one application from inside the !Run file of another, you
- should first enter the command
- 4.10
- *Desktop Run <sibling task name>
- 4.10
- and then repeat the *Wimpslot command from earlier in the !Run file to
- ensure that there is enough memory available for the main application
- before you run it.
- 4.10
- Thus, for example, to make Impression automatically load a printer
- driver whenever it is run you should edit the !Impress.!Run file by
- inserting two extra lines immediately before the last so that the last
- three lines read:
- 4.10
- Desktop Run [...path...].!PrinterXX
- 4.10
- Wimpslot −min xxxK −max xxxK
- 4.10
- Run “<Impression$Dir>.!RunImage” %*0
- 4.10
- The xxxK in the Wimpslot command should be exactly the same as used
- earlier in the !Run file − the precise amount of memory needed will vary
- from one version of Impression to another. Hugh Eagle, Horsham.
- 4.10
- • Sound improvements − A much improved sound, which is also more
- controllable, can be obtained using the standard colour monitor supplied
- with the Archimedes. A 3.5mm jack (Archimedes) to phono (monitor) cable
- is required, and the speaker on the Archimedes should be turned off
- using *SPEAKER OFF. Sean Kelly, London
- 4.10
- • Sound voice changes − Among the (many) things that annoy me are those
- professional programmers who alter your Sound Voice for their games
- which otherwise claim to be “RISC-OS Compatible”. They return you to the
- desktop with their Sound Modules set up as ChannelVoice 1. Not everyone
- likes the WaveSynth-Beep as default voice, and as for some of the sound
- modules or digitised Voice Modules which are then sounded when an error
- occurs, YUK!
- 4.10
- It is quite a simple matter to find out what ChannelVoice the user has
- set up and the program could very easily, before exiting to the desktop,
- restore it using the following code which is available for all program
- mers to use, professional or amateur (please!).
- 4.10
- REM Find the User’s ChannelVoice 1
- 4.10
- SYS “Sound_AttachVoice”,1,0 to ,user_voice%
- 4.10
-
- 4.10
- REM Because ChannelVoice 1 now equal to 0, reset
- 4.10
- SYS “Sound_AttachVoice”,1,user_voice%
- 4.10
- REM Rest of program, Wimp Interface, whatever
- 4.10
- *ChannelVoice 1 Totally Fantastic Voice
- 4.10
-
- 4.10
- REM Program at end, restore user voice
- 4.10
- SYS“Sound_AttachVoice”,1,user_voice%
- 4.10
- David Shepherdson
- 4.10
- • Toolkit Plus update − Clares’ Toolkit Plus usually produces a ‘Bad
- disc address’ error when you try to edit E format floppy discs. This can
- be rectified by performing the following:
- 4.10
- 1 RMLoad the Toolkit Plus module.
- 4.10
- 2 Type: *Modules <return> and take note of the ‘position’ address of the
- Toolkit Plus module.
- 4.10
- 3 Use *WFIND &EF060240 <return> and ignore the first occurrence (i.e.
- press <ctrl-tab> to go on to the next occurrence).
- 4.10
- 4 Locate the instruction seventeen lines down which reads BCC xxxxx.
- 4.10
- 5 Select ‘word mode’ and zero this instruction.
- 4.10
- You should now be able to edit E format discs.
- 4.10
- S Edwards, Wordsley
- 4.10
- • Toolkit Plus with SCSI − Clares’ Toolkit Plus provides a disc sector
- editor, which refused to work on my SCSI hard disc. A modified Toolkit
- Plus may be produced by using !Edit on the Toolkit Plus module to
- replace all occurrences of ‘ADFS’ with ‘SCSI’ before saving the module
- with a new name e.g. SCSITools.
- 4.10
- A drawback is that the modified version will not cope with ADFS
- floppies. Changing the module name (e.g. from ‘Toolkit+’ to ‘SCSITools’)
- using !Edit allows the modified and original modules to be present at
- the same time, and changing the disc edit command names allows both ADFS
- and SCSI discs to be edited − for instance, !Edit could be used to
- replace ‘AEDIT’ in Toolkit+ with ‘WEDIT’ in SCSITools.
- 4.10
- Sean Kelly, London
- 4.10
- Impression Hints and Tips
- 4.10
- • Abbreviations − I use abbreviations quite a lot such as “imp” for
- Impression and just “r” for Archimedes but I often want to say, for
- example “ ...using DrawPlus (Careware 13)...” and although “ca” and “Ca”
- are both set up to expand to “Careware”, using “(ca” doesn’t work. There
- is no easy way round it as far as I know − you just have to put “(ca”
- into the abbreviations dictionary to expand to “(Careware”.
- 4.10
- • Bullets − We’ve mentioned that <ctrl-shift-H> produces a bullet but
- since <backspace> (immediately below <F12> and above <\>) produces the
- same ASCII code as <ctrl-H>, you will find that <shift-backspace>
- produces a bullet. Touch typists may well find it somewhat more natural
- than <ctrl-shift-H>.
- 4.10
- • Creating tables − The release notes issued with Impression II describe
- the new features of version 2.12 but they do less than justice to one of
- those features, namely the capacity to create tables. It is possible to
- vary the width of individual columns and individual rows in a table as
- well as the thickness of the vertical and horizontal lines which form
- the table.
- 4.10
- In addition, the many editing facilities of Impression can be used to
- modify text which has been entered into the table so that the style and
- size of the characters in any “cell” of the table can be varied as
- desired.
- 4.10
- Moreover, in the manner usual with Impression II, another frame can be
- superimposed on any selected part of the table with the effect that
- lines of the table can be covered and will “disappear” permitting text
- of any size and nature to be introduced and adjusted to appear to be a
- part of the structure of the table.
- 4.10
- In addition to text, any of the superimposed frames can be made graphics
- frames permitting illustrations to be introduced. You can use left hand
- tabulation in the some columns, right hand tabulation in others and
- decimal point tabulation in others.
- 4.10
- Practical matters: First construct the empty table. Then determine which
- cells will be visible in the completed table and enter text into those
- cells, Finally, superimpose other frames as required. Proceeding in this
- order prevents interference with tabulation.
- 4.10
- The usual procedure will be to construct a table of this kind within a
- frame of its own so that it can be moved as a whole to any desired
- position within the document of which it will form a part. Therefore, on
- completion of the table, the various frames of which it is composed
- should be Grouped so that the table occupies a single frame. George
- Foot, Oxted. A
- 4.10
-
- 4.10
-
- 4.10
-
- 4.10
- Oak
- 4.10
- From 4.9 page 12
- 4.10
-
- 4.10
- Lindis International
- 4.10
- From 4.8 page 16
- 4.10
-
- 4.10
- Computer Concepts
- 4.10
- New artwork
- 4.10
- Coming direct to you, hopefully!
- 4.10
- If not, use old one.
- 4.10
-
- 4.10
- Computer Concepts
- 4.10
- New artwork
- 4.10
- Coming direct to you, hopefully!
- 4.10
- If not, use old one.
- 4.10
-
- 4.10
- Graphics Galore on the Cheap!
- 4.10
- Tord Eriksson
- 4.10
- Reading with amazement about the latest version of Ventura Publisher Mac
- that costs a cool £695 (exclusive VAT!) and so-called ‘budget’ DTP
- programs for IBMs weighing in at £70 to £160, I wonder if we Archimedes
- users really know how fortunate we are when it comes to good, cheap
- software.
- 4.10
- The “budget” DTP programs for IBMs can’t even word-process − you have to
- use a separate editor, just as you have to do if you do some DTP with
- !Draw....
- 4.10
- Of course, the latest version of Ventura Publisher Mac can print fonts
- in 23½ size instead of just 23 or 24 point size − a revolution no doubt
- but one that almost all DTP and word-processors for our Archimedes
- machines manage easily!
- 4.10
- Archimedes − no master of colours!
- 4.10
- There is a difference between modern IBMs and Mac II’s that puts all
- Acorn computers at a disadvantage, even if it was once hailed as an
- advance over said computers: Colours!
- 4.10
- In terms of colour, both Mac II computers and IBMs with VGA are better
- than Archimedes and the sky is the limit as there are hundreds of
- graphics cards that can be bought that improve things further − 24-bit
- colours are available.
- 4.10
- RISC-OS has an upper limit of 8 bits per pixel, 256 colours − 24 bits
- per pixel gives 16,777,216 different colours, quite a lot more!.
- 4.10
- For the Archimedes range, the limitations are built-in, through RISC-OS
- and the fixed hardware. (There are some improvements possible with
- hardware add-ons, but nothing major).
- 4.10
- Serious DTP is black & white!
- 4.10
- Fortunately, colour printers are very rare in everyday printing, mainly
- due to the fact that such printers are very costly and/or requires
- skilled staff to attend to them.
- 4.10
- So, for practical purposes, DTP will continue to be a mainly black &
- white affair, maybe with some colour thrown in for good measure on
- covers etc.
- 4.10
- The woes of illustrating....
- 4.10
- Being a former technical illustrator, I am painfully aware of the amount
- of work needed to set text in a circular fashion as on a coin or an
- official seal or make the logo on a fluttering flag look like the real
- thing. Hours and hours of work, or in the case of the flag, take a photo
- of the real thing and trace that with tracing paper....
- 4.10
- If the logo is new, you can’t print it first on a flag, so you try to
- make do with crinkling a piece of paper upon which you put your text or
- logo and take a photo of that....
- 4.10
- All this is now of the past, as long as your logo or text can be
- transformed into a !Draw file.
- 4.10
- First − !FontFX
- 4.10
- Let us try an example: There used to be an oil company around this part
- of the world called Caltex. Let us say we are going to do a drawing with
- a flag fluttering with that name on it.
- 4.10
- First we have the text, set in Pembroke:
- 4.10
- To make it more interesting let’s add a shadow, with the shadow in the
- north-east, and make the text itself a black outline filled with a light
- grey and behind it, the dark grey shadow:
- 4.10
-
- 4.10
-
- 4.10
-
- 4.10
- Both these operations are very easy to do with !FontFX as you just click
- on the buttons needed, no previous know-how needed!
- 4.10
- To make this flutter we have to use a couple of other utilities:
- !DrawPlus (or !Draw) and DrawBender.
- 4.10
- Warped universe
- 4.10
- A normal picture is plotted in our brain according to the angle we watch
- the picture from: If we fly above a square field the corners are right
- angle corners (a so-called bird’s-eye view) and if we stand just outside
- the field the angles get very odd indeed − their sum is still 360,
- though!
- 4.10
- If a square is wrapped around a cylinder things get much more compli
- cated, especially when seen at an angle − an illustrator’s nightmare!
- Not even all CAD programs seems to be able to solve it correctly....
- 4.10
- Secondly − make a mould!
- 4.10
- DrawBender manipulates !Draw files by plotting them inside each other:
- Any text that is going to be manipulated has to be in !Draw format. The
- coordinate system “inside” a square is still square but inside a circle
- it takes on the characteristics of a text printed on a balloon like
- this:
- 4.10
-
- 4.10
-
- 4.10
-
- 4.10
-
- 4.10
- The first (the circle) is called the mould and the second (the square
- inside a frame) is called the object.
- 4.10
- Due to the way DrawBender works, a real circle couldn’t be used − it had
- to be substituted it with a 32-sided polygon and it had to be flipped
- over because paths have to be clockwise to work as moulds in DrawBender
- whereas !Draw and !DrawPlus draw counter-clockwise − it’s all very well
- explained in the DrawBender manual!
- 4.10
- Wonderful results!
- 4.10
- Taking the text, we put it on rectangular background, to make the
- outline of the flag as the outline of the mould doesn’t show up on the
- finished result:
- 4.10
- This is now our object! A “flapping flag” is our mould:
- 4.10
- Conclusion
- 4.10
- As the end result shows the effect is quite stunning. This amount of
- manipulation is available to IBM users of course − I could recommend
- Express Publisher (£159.95) as the “low-cost” alternative!
- 4.10
- For Archimedes users the cost is just £21, including two manuals and
- lots of sample files (available from Ian Copestake Software). A
- 4.10
-
- Hints and Tips
- 4.11
- • Running applications − Carrying on from Hugh Eagle’s tip about running
- one application from inside another, on a A310, if you only have
- floppies and have, say, a DTP !Impression disc with !PrinterDM ,
- !FontDraw and !DrawPlus all at the same level, you can tailor the !run
- file of, say, !Impression to load other applications at the same
- directory level, dependant on memory, by using the command
- 4.11
- *desktop <obey$dir>.^.!second_
- 4.11
- application_name
- 4.11
- the <obey$dir> sets the filing system into the first selected appli
- cation (!Impression.) and the .^. takes it back up to the level you were
- at first! The next application then loads on the desktop ready for use.
- Repeat the line with “!third_ application_name” and so on. Ned Abell
- 4.11
- • Colour separations − Last month, there was a question from John
- Oversby about a colour separation program for !Draw or sprite files. One
- solution is to use DrawPlus (Careware 13), actually drawing different
- colours on different “layers”. Another possible solution revolves around
- the Impression Business Supplement which provides colour separation for
- PostScript files. However, the ideal solution is a simple “filter”
- program which takes in a !Draw file and selects all objects of a
- particular colour and puts them into a new !Draw file. Does anyone know
- of such a program? I would be interested in using this for producing
- double-sided printed circuit boards using !Draw. It is easy to write a
- Basic program to do this starting from the !Draw format as specified in
- the PRM − I could even do this myself − but making it RISC-OS-ified is
- another matter. Brian Cowan
- 4.11
- Impression H & T
- 4.11
- • Business Supplement − Like many of you I was excited about the release
- of more software for serious users of Impression II. The addition of the
- mail-merge facility is particularly useful. However, I have noticed that
- it suffers from a problem that early versions of Impression had. Namely,
- using the * print facility causes the print to crash after the first
- document with “Invalid number of output bits” in multiscan mode. The
- problem is resolved by switching to mode 15. Also, beware of forgetting
- to load your RISC-OS printer driver before requesting a print from
- !Importer. This is because it won’t warn you that you will receive a
- draft copy − and worse, you have to close everything down and start
- again.
- 4.11
- Another word of warning to those of you planning to buy the supplement
- thinking that the WordStar loader will solve all your translation
- problems − it doesn’t (not on my version, anyway)! If I had thought
- about it, the result one gets is obvious. All the ASCII spaces that mess
- up justification are stripped − but this is at the cost of losing a
- space at the end of a line. Consequently, numerous words are joined
- together. If you are prepared to use the spellchecker to separate the
- words again the utility is fine and it does stop those messy spaces
- appearing whenever you make an alteration to the text. However, it’s
- still hard work! John Brocks
- 4.11
- • Font usage − Is there a product or would someone like to write an
- application which takes an Impression document and tells you what
- fonts are required? The reason for this is that some PD software
- includes documentation prepared in Impression format. This is a great
- idea but sometimes strange fonts are used. If you are using Adrian
- Look’s !FontDir (Shareware 36) then you need to know which fonts are
- needed before Impression is booted up. Brian Cowan
- 4.11
- That should be easy enough. If you want to do it manually, you can save
- the text of an Impression document with styles and look at it in Edit.
- You can search for “font ” and look through all the references to
- particular fonts as they occur in the style definitions and as effects
- within the text. Mind you, that will give you the fonts that appear
- within the style definitions regardless of whether those styles have
- actually been used in the document. Anyone want to have a go at writing
- such an application?
- 4.11
- Is anyone interested in / able to convert between the Impression
- Document Description File format and TeX? I think it should be possible
- since both contain the same sort of information. This would be useful
- for scientific applications where many journals accept material on disc
- or by wire in TeX format. Brian Cowan
- 4.11
- • Labels and tickets − When I was printing video cassette labels onto a
- roll of adhesive labels they were printing too far to the right. I
- failed to understand that !Impression is smart and says, “right, you are
- printing a document 165mm wide. I will print it 82.5mm to the right and
- left of the centre line of the printer”. I have a mark on the case of my
- Citizen 120D printer to align the left hand side of A4 paper, when
- putting in individual sheets but I can’t centre different rolls of
- labels accurately without putting several marks on the case which would
- be confusing so I got round the problem by designing new master pages
- that are always A4 width (210 mm) and creating a frame on that page that
- is the right width for the labels and off centred to the left. I
- continue to put the label roll edge to the mark.
- 4.11
- I then had to change the !Printer DM page size to one 102mm by 210mm
- wide which gives me the the right “greying” on the screen as I have
- “Preferences”, “Show page borders”, switched on. This prints two perfect
- sets of labels but I still get unwanted form feeds at the end of the
- page! (Example supplied on monthly program disc.) Ned Abell
- 4.11
- • Retaining styles − Hugh Eagles’s question about setting a style in a
- blank Impression frame (Archive 4.9 p11) can be answered in terms of
- ‘Place holding’ in the same way as my hint on re-aligning lines starting
- with a different font (Archive 4.8 page 11). Just set the style and type
- a ‘null’ character in the frame (i.e. one which is not defined in the
- font you are using) by using Alt and the keypad numbers. (EFF fonts are
- rapidly filling up, making null characters harder to find, but try 136
- or 139.) Bruce Goatly
- 4.11
- • Un-deleting − As you probably know, you can highlight a passage, type
- over it and thereby replace it. Well, if you have second thoughts
- immediately afterwards, you can restore the original by highlighting the
- replacement passage and typing <ctrl-V>. This deletes the replacement
- altogether rather than cutting it to the clipboard; the clipboard still
- contains the original version. Bruce Goatly A
- 4.11
-
- 4.11
- Help!!!!
- 4.11
- • Mac Scanner − Does anybody know of software to use a Mac AppleScanner
- with a SCSI interface on an Archimedes? Brian Cowan
- 4.11
- • Podule expansion − Does anyone know of an expansion box which allows
- more than 4 podules to be attached to an Archimedes computer at any one
- time? A G Duckett, Telford. A
- 4.11
-
- 4.11
-
-
-
- ProTips
- 4.11
- Peter Jennings
- 4.11
- This is a column of hints and tips for users of Protext 5. It is not
- intended as a regular feature to rival PipeLine as there are probably
- not yet enough users of the Archimedes version of Protext to support it.
- Arnor have promised to keep me informed of developments to Protext,
- particularly the eagerly awaited RISC-OS version, and I will pass the
- details on in future issues of Archive, along with any hints or tips
- that pioneering users of this exciting new word processor may care to
- send by way of Paul Beverley.
- 4.11
- In the meantime, here are a few hints of my own plus advice on an
- irritating bug that has emerged from the software since I completed the
- review in last month’s Archive.
- 4.11
- First the bug, which has suddenly appeared after lying dormant during
- three months’ constant use of Protext. It shows itself during attempts
- to save a file, either manually or automatically, with two messages, one
- saying that the file “PROTEXT!X” or “PROTEXT!T” cannot be found and the
- other: “Error creating file”. More alarmingly, the text sometimes
- disappears from the screen. Any further attempt to save brings a “File
- open” message. My description of this as “irritating” may seem rather
- inadequate but, in fact, it is not disastrous and can be dealt with
- quite easily. When the message about PROTEXT!X appears just type “close”
- at the command line, followed by “s” (for save). Your original file name
- will then be offered and pressing <return> will duly save it.
- 4.11
- Arnor have not given me any fix for this fault but have just said,
- rather uncertainly: “We think we may have solved the problem in the next
- version of Protext.” Let us hope they have.
- 4.11
- Omissions
- 4.11
- Two strange omissions from Protext, so far, are a function key strip and
- an icon. If you dislike the boring default applications icon, or the
- blank squares representing files, you can always design your own icons,
- using !Paint. First create a directory for them, called !Sprites, inside
- the main !Protext directory. Then design an application icon named
- !protext and a files icon called file_cdf, with additional small
- versions if wanted. Finally, add an initial line to the !Boot file:
- “IconSprites <Obey$Dir>.!Sprites”. If you are not sure how to create
- icons there are instructions in the chapter on “Paint” in the User Guide
- or you can find a set of ready-made sprites in a !Sprites directory on
- this month’s program disc. You can just copy !Sprites into the !Protext
- directory but do not forget to add the IconSprites line to the !Boot
- file. The ready-mades have a simple “P5” design, with a border round the
- files sprite, but are colourful enough to be readily identified in a
- desktop directory.
- 4.11
- A do-it-yourself function key strip is also easily made, either using a
- program which provides a template or by starting from scratch with
- Protext’s excellent line drawing facility. One made this way is also on
- this month’s disc. It has to be printed in two sections, one below the
- other, as Protext can not print down the paper in landscape form. Anyone
- who has a wide-carriage printer can copy the second section beside the
- first by using the Protext “box” marking facility.
- 4.11
- Line drawing
- 4.11
- When making a grid by line drawing, the natural way is to begin by
- drawing either the horizontal lines or the outside box shape and then
- adding the verticals afterwards. If you do it this way, however, you may
- find the vertical lines going slightly beyond the outside boundaries. To
- correct this, draw the uprights with the up or down arrow key, as
- normal, but use one of the horizontal, left or right, arrow keys for the
- final stroke before reaching the horizontal boundary. The line will then
- turn the corner to make a neat join instead of an intersection. Corners
- are drawn in the same way.
- 4.11
- Although Protext comes with 48 printer drivers, there isn’t one for the
- very popular Panasonic KX-P1081 printer, which I use. The FX80 printer
- driver is suitable for it but will not print line drawings. So the
- function key strip needs to have the IBM9 printer driver loaded and one
- of the printer’s tiny DIP switches changed. These can be found below and
- immediately to the right of the printer head when it is in its “home”
- position on the extreme left. Lift up the thin strip of clear plastic
- covering them and use a small screwdriver or similar implement to push
- switch number one, on the extreme left, down (for off). The other
- switches can probably be left as set but if you still have a problem try
- putting either switch six or seven up (for on).
- 4.11
- Hopefully, Arnor will produce a key strip and their own official icons
- when the RISC-OS version of Protext finally appears.
- 4.11
- Obvious when you know
- 4.11
- Finally, a few brief tips of the “it’s obvious when you know” variety.
- You can find your version number of Protext by pressing <escape> and
- reading the bar above the command line. This also shows you the current
- directory and the selected printer driver.
- 4.11
- The “Swap” line at the top of the colour configuration menu puzzled me
- for a time as it does not seem to be explained anywhere. I eventually
- discovered that selecting it and pressing <return> shows the colours
- used for alternate documents when more than one is loaded.
- 4.11
- It is a good idea to lock the files of templates, such as letter
- headings, to prevent them being overwritten if a document you are
- working on is automatically saved with the template’s name. If, for any
- reason, you cannot lock the template, load it with the command “m” for
- merge instead of “l” for load. The bar at the top of the screen will
- show “No file” and you will be asked for a name before the document is
- saved. A
- 4.11
-
- Hints and Tips
- 4.12
- • Basic line lengths revisited (Archive 4.10 p7) − The Basic line input
- buffer is 238 characters and so this is the most you can type in from
- the Basic prompt. Once entered, this line is tokenised before being
- stored as part of a program. Most of the keywords are reduced to only
- one byte, so the line ends up taking up much less room in a program. The
- maximum length for a line in a program is 255 bytes, but four of these
- bytes have special purposes (one is a line terminator, one the line
- length and two the line number). This leaves 251 bytes for the rest of
- the line. So what’s the point in allowing bigger lines in the program if
- you can’t type them in? Well, you can by being devious. Try typing the
- following at the Basic prompt:
- 4.12
- 10E.:E.:E.: etc
- 4.12
- until you hit the line limit and then press Return. Listing your program
- now should reveal:
- 4.12
- 10ENDPROC:ENDPROC:ENDPROC: etc
- 4.12
- up to a length of about 790 characters! This line is perfectly valid and
- would run OK (although I can’t think of a program where 79 ENDPROCs in a
- row would be useful!) but is much too long to edit at the Basic prompt
- or in the Basic Editor. It wouldn’t be sensible for the Basic Editor to
- limit you to 251 characters since, once tokenised, your line would be
- much shorter, so it allows you to type up to 369 characters hoping that
- tokenising will bring it back to 251. It objects if you try to type in
- more than 369 characters; it also objects if you type a shorter line
- which would be longer than 251 characters once tokenised (try REM
- followed by 300 letters). As for solving the problem, if you have a copy
- of Twin, you could try loading your Basic program into it. Twin has no
- line length limit and will cope with anything. Returning to Basic will
- always work provided the resulting tokenised lines would be no longer
- than 251 characters. Lorcan Mongey
- 4.12
- • Citizen printer spare parts − You may be interested to know that you
- can get spare parts for Citizen printers from XMA Ltd, Ruddington Lane,
- Wilford, Nottingham, NG11 7EP. (0602 −818222) Rob Brown, Tadworth,
- Surrey.
- 4.12
- • Fatal error type = 5 − !Edit will report this error if you have too
- many outline fonts in your !Fonts folder. This will prevent you from
- editing any documents within !Edit. The following Basic program will
- solve this problem by hiding the !Fonts folder before running !Edit and
- then restoring it once !Edit has been run.
- 4.12
- 1. Rename the ‘!RunImage’ file inside the ‘!Edit’ folder as ‘EditImage’.
- 4.12
- 2. Type the following program in and then save it as ‘!RunImage’ in the
- ‘!Edit’ folder.
- 4.12
- REM ><Edit$Dir>.!RunImage
- 4.12
- SYS “Wimp_Initialise”,200,&4B534154, “EditStart” TO ,taskid%
- 4.12
- *Set temp <Font$Prefix>
- 4.12
- *UnSet Font$Prefix
- 4.12
- *WimpSlot -min 160k -max 160k
- 4.12
- *WimpSlot -min 160k
- 4.12
- SYS “Wimp_StartTask”,“Run <Edit$Dir> .EditImage ”+FNenv_string
- 4.12
- *Set Font$Prefix <temp>
- 4.12
- *Unset temp
- 4.12
- SYS “Wimp_CloseDown”,,taskid% ,&4B534154
- 4.12
- END
- 4.12
-
- 4.12
- DEFFNenv_string
- 4.12
- LOCAL env$,x%
- 4.12
- SYS “OS_GetEnv” TO env$
- 4.12
- IF LEN(env$)<6 THEN =“”
- 4.12
- WHILE INSTR(env$,“ ”,x%)>0
- 4.12
- x%=INSTR(env$,“ ”,x%)+1
- 4.12
- ENDWHILE
- 4.12
- =RIGHT$(env$,LEN(env$)-x%+1)
- 4.12
- • Locating the I/O podule (a SWI number change) − Those writing code
- for the I/O podule for use on different machines should note that Acorn
- made a SWI number change between version 1.04 and 1.06 of the software
- (use *Help Modules to find what version you have). Earlier issues of the
- podule use &4043F for SWI “I/O _Podule_Hardware” whereas the later
- versions use &40500. ARM code assembled on a machine with one version of
- the software will not work on another machine with a different version
- without changing this SWI number. Richard House, Surrey.
- 4.12
- • PC screen fonts − If you are not overly fond of the chunky IBM
- character set in the PC emulator, the following few lines of Basic will
- modify the emulator ROM file with the BBC font of your choice.
- 4.12
- REM >PCFONT
- 4.12
- REM Merge BBC FONT file into !PC ROM file
- 4.12
- REM N.B. *** COPY ORIGINAL ROM FILE BEFORE RUNNING THIS ***
- 4.12
- :
- 4.12
- DIM rom% &2000 : offset%=&166E
- 4.12
- R$=“:4.$.!PC.ROM”
- 4.12
- OSCLI(“Load ”+R$+“ ”+STR$~rom%)
- 4.12
- A%=OPENIN(R$) : r1%=EXT#A% : CLOSE#A%
- 4.12
- :
- 4.12
- F%=OPENIN(“4:.BBCFONTS.NEWFONT”) : REM file of type &FF7
- 4.12
- REPEAT
- 4.12
- A%=BGET#F%
- 4.12
- IF A%<>23 THEN PRINT “This is not a BBC font file!” : END
- 4.12
- C%=BGET%F%
- 4.12
- FOR I%=0 TO 7
- 4.12
- rom%?(offset%+((C%+128) MOD 256) *8+ I%)=BGET#F%
- 4.12
- NEXT I%
- 4.12
- UNTIL EOF#F%
- 4.12
- CLOSE#F%
- 4.12
- :
- 4.12
- OSCLI(“Save ”+R$+“ ”STR$~rom%+ “ + ”+STR$~r1%)
- 4.12
- END
- 4.12
- This program has been used successfully on the ROM files supplied with
- version 1.33 and the latest 1.60 (large and small) − each version stores
- its VDU 23 character definitions from offset &166E onwards. Pete Bready,
- Glasgow.
- 4.12
- • Impression Junior styles? − In the June 1991 edition of Archive, it
- was pointed out that Impression Junior does not have styles. Although it
- does not have styles, it does have rulers. These are intended to define
- margins and tab-stops, but they can be used for other things.
- 4.12
- If you save a text story with effects, you will see the definition of a
- ruler, which looks like:
- 4.12
-
- 4.12
- There will also be the definition of the BaseStyle, which contains a
- number of additional commands. By copying some of these to the ruler
- definition, you can create the equivalent of a style. As an example, a
- ‘style’ that changes the font of the text subject to the ruler to greek,
- could be, for example:
- 4.12
-
- 4.12
- As Impression Junior does not have the facility to create rulers with
- these extensions, they must be written using an ordinary text editor
- (such as !Edit) and imported into Impression where they become rulers.
- 4.12
- The commands that I know work are:
- 4.12
- font <font name> − e.g. Greek, Trinity.Medium, etc
- 4.12
- fontsize <size>pt − 8 to 20 is reasonable
- 4.12
- fontaspect <size>% −
- 100 normal, 200 stretches to twice size
- 4.12
- fontcolour rgb = (<n>,<n>,<n>) − n is from 0 to 1 or 0 to 100 (both
- appear to work)
- 4.12
- linecolour rgb = (<n>,<n>,<n>) − as above
- 4.12
- justify [left, right, centre, full] − full is to both margins
- 4.12
- underline [0,1] − other
- values also work but give strange underline
- 4.12
- strikeout [on, off] −
- writes ‘-’ over characters
- 4.12
- script [off, sub, super] −
- sub and super-scripts
- 4.12
- leader “<text>” − overwrites
- tab character
- 4.12
- By using these additional commands, it is possible to generate some very
- useful rulers.
- 4.12
- Simon Callan, Borehamwood. A
- 4.12
-
-